openapi: 3.1.0
info:
description: Adaptation of beckn protocol for the mobility sector. Compatible with core version V1.1.
title: Beckn Mobility API Specification
version: 0.8.3
security:
- SubscriberAuth: []
servers:
- url: 'https://ps-bap-client.becknprotocol.io'
description: BOC Network
paths:
/search:
post:
description: Search for services by intent
operationId: search
tags:
- Beckn Provider Platform (BPP)
- Beckn Gateway (BG)
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
message:
properties:
intent:
$ref: '#/components/schemas/Intent'
type: object
required:
- context
- message
- allOf:
- properties:
context:
properties:
location:
properties:
city:
properties:
code:
type: string
required:
- code
country:
properties:
code:
type: string
enum:
- IND
required:
- code
bap_id:
type: string
pattern: '^(?!https?://).*$'
bpp_id:
type: string
pattern: '^(?!https?://).*$'
ttl:
type: string
format: date-time
timestamp:
type: string
format: date-time
required:
- location
- domain
- action
- message_id
- transaction_id
- timestamp
- bap_id
- bap_uri
- ttl
- properties:
context:
properties:
action:
type: string
enum:
- search
- properties:
message:
properties:
intent:
properties:
tags:
items:
properties:
list:
items:
properties:
value:
type: string
enum:
- START
- STOP
payment:
properties:
collected_by:
type: string
enum:
- BPP
- BAP
required:
- collected_by
required:
- payment
- tags
required:
- intent
- properties:
message:
properties:
intent:
properties:
payment:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: STATIC_TERMS
required:
- code
value:
type: string
format: uri
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_TYPE
required:
- code
value:
type: string
enum:
- upi
- neft
- rtgs
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_WINDOW
required:
- code
value:
type: string
pattern: '^PT\d+[MH]$'
required:
- descriptor
- value
- properties:
message:
properties:
intent:
properties:
fulfillment:
properties:
stops:
allOf:
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: START
required:
- location
- type
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: END
required:
- location
- type
required:
- stops
required:
- fulfillment
examples:
Search for services in the city of Bengaluru by pickup and drop location:
value:
context:
action: search
bap_id: example-bap.com
bap_uri: 'https://api.example-bap.com/pilot/bap/cab/v1'
domain: 'nic2004:60221'
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: 1.1.0
message:
intent:
fulfillment:
stops:
- location:
gps: '12.923608703179461, 77.61462964117527'
type: start
- location:
gps: '12.9346302, 77.61533969999999'
type: end
Search by pickup and drop location with localization info:
value:
context:
action: search
bap_id: example-bap.com
bap_uri: 'https://api.example-bap.com/pilot/bap/cab/v1'
domain: 'nic2004:60221'
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: 1.1.0
message:
intent:
fulfillment:
customer:
person:
languages:
- code: en
name: English
stops:
- location:
gps: '12.923608703179461, 77.61462964117527'
type: start
- location:
gps: '12.9346302, 77.61533969999999'
type: end
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
/select:
post:
description: Select items from the catalog and build your order
operationId: select
tags:
- Beckn Provider Platform (BPP)
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
- message
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- select
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
examples:
Get a quote for a fare product selected from a public transit catalog:
value:
context:
action: select
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
items:
- id: '1'
provider:
id: '1'
Get quote for a specific product from a mobility catalog:
value:
context:
action: select
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
max_callbacks: 3
message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b
timestamp: '2023-03-23T04:46:45Z'
transaction_id: 870782be-6757-43f1-945c-8eeaf9536259
ttl: P120S
version: 1.1.0
message:
order:
fulfillments:
- stops:
- location:
gps: '12.910458, 77.543089'
type: start
- location:
gps: '12.9535139, 77.5710434'
type: end
items:
- id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
provider:
id: '1'
Get quote for a specific product from a mobility catalog with gps and address details:
value:
context:
action: select
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
max_callbacks: 3
message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b
timestamp: '2023-03-23T04:46:45Z'
transaction_id: 870782be-6757-43f1-945c-8eeaf9536259
ttl: P120S
version: 1.1.0
message:
order:
fulfillments:
- stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
items:
- id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
provider:
id: '1'
Get quote for a specific product from a mobility catalog with localization:
value:
context:
action: select
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
max_callbacks: 3
message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b
timestamp: '2023-03-23T04:46:45Z'
transaction_id: 870782be-6757-43f1-945c-8eeaf9536259
ttl: P120S
version: 1.1.0
message:
order:
fulfillments:
- customer:
person:
languages:
- code: en
name: English
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
items:
- id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
provider:
id: '1'
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
/init:
post:
description: Initialize an order by providing billing and/or shipping details
operationId: init
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
required:
- context
- message
- allOf:
- allOf:
- $ref: '#/paths/~1search/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
required:
- bpp_id
- bpp_uri
- properties:
context:
properties:
action:
type: string
enum:
- init
- properties:
message:
properties:
order:
type: object
properties:
provider:
type: object
properties:
id:
type: string
required:
- id
items:
type: array
items:
type: object
properties:
id:
type: string
required:
- id
required:
- provider
- items
- allOf:
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/3'
- $ref: '#/paths/~1on_select/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
- properties:
message:
properties:
order:
required:
- fulfillments
- allOf:
- properties:
message:
properties:
order:
properties:
payments:
type: array
items:
type: object
properties:
type:
type: string
enum:
- PRE-ORDER
- ON-FULFILLMENT
- POST-FULFILLMENT
status:
type: string
enum:
- PAID
- NOT-PAID
collected_by:
type: string
enum:
- BAP
- BPP
params:
type: object
properties:
amount:
type: string
pattern: '^\d+(\.\d{1,2})?$'
currency:
type: string
required:
- type
- status
- collected_by
- params
required:
- payments
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
params:
required:
- bank_code
- bank_account_number
- virtual_payment_address
required:
- type
- status
- collected_by
- params
required:
- payments
- properties:
message:
properties:
order:
properties:
billing:
required:
- name
required:
- billing
examples:
Initialize draft order and request for terms of service:
value:
context:
action: init
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
items:
- fulfillment_ids:
- fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
payment:
- collected_by: BPP
id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
type: ON-FULFILLMENT
provider:
id: '1'
Initialize the order by providing billing details:
value:
context:
action: init
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
items:
- id: '1'
provider:
id: '1'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/confirm:
post:
description: Initialize an order by providing billing and/or shipping details
operationId: confirm
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- confirm
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- allOf:
- $ref: '#/paths/~1on_select/post/requestBody/content/application~1json/schema/allOf/1/allOf/6'
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
items:
allOf:
- properties:
customer:
properties:
contact:
properties:
phone:
type: string
pattern: '^\+?[1-9]\d{1,14}$'
required:
- phone
person:
properties:
name:
type: string
required:
- name
required:
- contact
- person
required:
- customer
- allOf:
- properties:
message:
properties:
order:
properties:
items:
type: array
minItems: 1
items:
type: object
properties:
id:
type: string
descriptor:
type: object
properties:
name:
type: string
code:
type: string
enum:
- RIDE
required:
- code
price:
type: object
properties:
value:
type: string
required:
- value
fulfillment_ids:
minItems: 1
location_ids:
minItems: 1
required:
- id
- price
- descriptor
required:
- items
- allOf:
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: FARE_POLICY
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- MIN_FARE
- MIN_FARE_DISTANCE_KM
- PER_KM_CHARGE
- PICKUP_CHARGE
- WAITING_CHARGE_PER_MIN
- NIGHT_CHARGE_MULTIPLIER
- NIGHT_SHIFT_START_TIME
- NIGHT_SHIFT_END_TIME
- EXTERNAL_REF
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: FARE_POLICY
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: MIN_FARE
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: MIN_FARE_DISTANCE_KM
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: PER_KM_CHARGE
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: PICKUP_CHARGE
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: WAITING_CHARGE_PER_MIN
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: NIGHT_CHARGE_MULTIPLIER
required:
- code
value:
type: string
pattern: '^[0-9]+(\.[0-9]+)?$'
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: NIGHT_SHIFT_START_TIME
required:
- code
value:
type: string
pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$'
required:
- descriptor
- value
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: FARE_POLICY
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
enum:
- MIN_FARE
- MIN_FARE_DISTANCE_KM
- PER_KM_CHARGE
- PICKUP_CHARGE
- WAITING_CHARGE_PER_MIN
- NIGHT_CHARGE_MULTIPLIER
then:
properties:
value:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
enum:
- NIGHT_SHIFT_START_TIME
- NIGHT_SHIFT_END_TIME
then:
properties:
value:
type: string
pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$'
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: EXTERNAL_REF
then:
properties:
value:
type: string
pattern: '^https?://[^\s/$.?#].[^\s]*$'
required:
- descriptor
- value
- allOf:
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: INFO
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- DISTANCE_TO_NEAREST_DRIVER_METER
- ETA_TO_NEAREST_DRIVER_MIN
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: INFO
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: ETA_TO_NEAREST_DRIVER_MIN
required:
- code
value:
type: string
pattern: ^\d+(\.\d+)?$
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: DISTANCE_TO_NEAREST_DRIVER_METER
required:
- code
value:
type: string
pattern: ^\d+(\.\d+)?$
required:
- descriptor
- value
- properties:
message:
properties:
order:
properties:
items:
type: array
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: INFO
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
enum:
- DISTANCE_TO_NEAREST_DRIVER_METER
- ETA_TO_NEAREST_DRIVER_MIN
then:
properties:
value:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- descriptor
- value
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- allOf:
- allOf:
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- BUYER_FINDER_FEES_PERCENTAGE
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: BUYER_FINDER_FEES_PERCENTAGE
required:
- code
value:
type: string
required:
- descriptor
- value
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
enum:
- BUYER_FINDER_FEES_PERCENTAGE
then:
properties:
value:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- descriptor
- value
- allOf:
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- SETTLEMENT_WINDOW
- SETTLEMENT_BASIS
- SETTLEMENT_TYPE
- MANDATORY_ARBITRATION
- COURT_JURISDICTION
- DELAY_INTEREST
- STATIC_TERMS
- SETTLEMENT_AMOUNT
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: STATIC_TERMS
required:
- code
value:
type: string
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_TYPE
required:
- code
value:
type: string
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_WINDOW
required:
- code
value:
type: string
required:
- descriptor
- value
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_WINDOW
then:
properties:
value:
type: string
pattern: '^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$'
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_BASIS
then:
properties:
value:
type: string
enum:
- INVOICE_RECEIPT
- DELIVERY
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: MANDATORY_ARBITRATION
then:
properties:
value:
type: string
pattern: ^(true|false)$
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: STATIC_TERMS
then:
properties:
value:
type: string
format: uri
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: COURT_JURISDICTION
then:
properties:
value:
type: string
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: DELAY_INTEREST
then:
properties:
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TYPE
then:
properties:
value:
type: string
enum:
- UPI
- NEFT
- RTGS
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_AMOUNT
then:
properties:
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- descriptor
- value
- properties:
message:
properties:
order:
properties:
payments:
items:
properties:
tags:
allOf:
- contains:
properties:
descriptor:
type: object
properties:
code:
const: BUYER_FINDER_FEES
required:
- code
- contains:
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_TERMS
required:
- code
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- properties:
message:
properties:
order:
properties:
payments:
type: array
items:
properties:
type:
type: string
params:
type: object
properties:
transaction_id:
type: string
required:
- type
allOf:
- if:
properties:
type:
const: PRE-ORDER
then:
properties:
params:
required:
- transaction_id
required:
- payments
- properties:
message:
properties:
order:
not:
required:
- id
examples:
Confirm ride booking:
value:
context:
action: confirm
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
items:
- fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
id: '1'
Confirm ticket booking:
value:
context:
action: confirm
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
items:
- id: '1'
payment:
params:
amount: '55'
currency: INR
transaction_id: '24566345563'
provider:
id: '1'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/status:
post:
description: Fetch the latest order object
operationId: status
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
message:
properties:
order_id:
$ref: '#/components/schemas/Order/properties/id'
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- status
- properties:
message:
properties:
order_id:
type: string
required:
- order_id
examples:
Get latest fulfillment status of a booking:
value:
context:
action: status
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order_id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
Get latest status of a transit ticket booking:
value:
context:
action: status
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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: '123413'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/update:
post:
description: Remove object
operationId: update
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- update
required:
- bpp_id
- bpp_uri
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
description: Updated order object
required:
- id
update_target:
description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```'
type: string
required:
- update_target
- order
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- update
- properties:
message:
type: object
properties:
order:
type: object
properties:
id:
type: string
required:
- id
update_target:
type: string
pattern: '^[^,]+(,[^,]+)*$'
required:
- order
- update_target
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/rating:
post:
description: Provide feedback on a service
operationId: rating
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- rating
message:
properties:
ratings:
type: array
items:
$ref: '#/components/schemas/Rating'
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- rating
- properties:
message:
properties:
ratings:
type: array
minItems: 1
items:
type: object
properties:
id:
type: string
value:
type: number
rating_category:
type: string
enum:
- RIDER
- DRIVER
- SERVICE
required:
- id
- value
- rating_category
examples:
Provide a rating:
value:
context:
action: rating
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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
version: 1.1.0
message:
ratings:
- id: b0462745-f6c9-4100-bbe7-4fa3648b6b40
rating_category: DRIVER
value: 4
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/support:
post:
description: Contact support
operationId: support
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- support
message:
properties:
support:
$ref: '#/components/schemas/Support'
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- support
- properties:
message:
properties:
support:
properties:
ref_id:
type: string
required:
- ref_id
examples:
Fetch support information related to a particular order:
value:
context:
action: support
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
support:
email: johndoe@gmail.com
phone: 91-876787656
ref_id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/track:
post:
description: Track an active order
operationId: track
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- track
message:
additionalProperties: false
properties:
callback_url:
format: uri
type: string
order_id:
$ref: '#/components/schemas/Order/properties/id'
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- track
- properties:
message:
properties:
order_id:
type: string
required:
- order_id
examples:
Track an active ride:
value:
context:
action: track
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order_id: 22e090fc-b8b1-4437-9126-ff7a71c7845c
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/cancel:
post:
description: Cancel an order
operationId: cancel
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- cancel
message:
properties:
cancellation_reason_id:
$ref: '#/components/schemas/Option/properties/id'
descriptor:
$ref: '#/components/schemas/Descriptor'
order_id:
$ref: '#/components/schemas/Order/properties/id'
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- cancel
- properties:
message:
properties:
order_id:
type: string
descriptor:
properties:
code:
type: string
enum:
- SOFT_CANCEL
- CONFIRM_CANCEL
required:
- code
cancellation_reason_id:
type: string
pattern: '^[0-9]+$'
required:
- order_id
- descriptor
- cancellation_reason_id
examples:
Cancel a ride with selected reason:
value:
context:
action: cancel
bap_id: api.beckn.juspay.in/pilot/bap/cab/v1
bap_uri: 'https://api.example-bap.com/pilot/bap/cab/v1'
bpp_id: 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: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
message_id: be6a495a-e941-4fbf-9d59-f1e6166cccc8
timestamp: '2023-03-23T05:15:08Z'
version: 1.1.0
message:
cancellation_reason_id: '5'
order_id: b4232ad4-19ee-4c67-9223-a5189b13a741
Cancel a ride with user provided information:
value:
context:
action: cancel
bap_id: api.beckn.juspay.in/pilot/bap/cab/v1
bap_uri: 'https://api.example-bap.com/pilot/bap/cab/v1'
bpp_id: 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: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
message_id: be6a495a-e941-4fbf-9d59-f1e6166cccc8
timestamp: '2023-03-23T05:15:08Z'
version: 1.1.0
message:
cancellation_reason_id: '7'
descriptor:
short_desc: Accidenally booked the ride
order_id: b4232ad4-19ee-4c67-9223-a5189b13a741
Cancel a transit ticket booking before the cancellation period:
value:
context:
action: cancel
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
cancellation_reason_id: '2'
id: '123413'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn Provider Platform (BPP)
/on_search:
post:
description: Send catalog
operationId: on_search
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
error:
$ref: '#/components/schemas/Error'
message:
properties:
catalog:
$ref: '#/components/schemas/Catalog'
required:
- catalog
type: object
required:
- context
- message
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_search
- properties:
message:
properties:
catalog:
type: object
properties:
descriptor:
type: object
properties:
name:
type: string
images:
type: array
items:
minItems: 1
required:
- name
required:
- descriptor
- properties:
message:
properties:
catalog:
type: object
properties:
providers:
type: array
minItems: 1
items:
type: object
properties:
id:
type: string
required:
- id
required:
- providers
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
fulfillments:
type: array
minItems: 1
items:
properties:
vehicle:
properties:
category:
type: string
enum:
- AUTO_RICKSHAW
- CAB
required:
- category
type:
type: string
enum:
- DELIVERY
required:
- id
- vehicle
- type
required:
- fulfillments
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
items:
type: array
minItems: 1
items:
type: object
properties:
descriptor:
type: object
properties:
name:
type: string
code:
type: string
enum:
- RIDE
required:
- code
price:
type: object
properties:
value:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- value
- currency
fulfillment_ids:
type: array
minItems: 1
payment_ids:
type: array
minItems: 1
required:
- id
- descriptor
- price
- fulfillment_ids
- payment_ids
required:
- items
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
collected_by:
type: string
required:
- collected_by
required:
- payments
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
fulfillments:
items:
properties:
stops:
allOf:
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: START
required:
- location
- type
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: END
required:
- location
- type
required:
- stops
- allOf:
- allOf:
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- BUYER_FINDER_FEES_PERCENTAGE
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: BUYER_FINDER_FEES_PERCENTAGE
required:
- code
value:
type: string
required:
- descriptor
- value
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: BUYER_FINDER_FEES
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
enum:
- BUYER_FINDER_FEES_PERCENTAGE
then:
properties:
value:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- descriptor
- value
- allOf:
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
type: array
items:
type: object
properties:
descriptor:
properties:
code:
type: string
enum:
- SETTLEMENT_WINDOW
- SETTLEMENT_BASIS
- SETTLEMENT_TYPE
- MANDATORY_ARBITRATION
- COURT_JURISDICTION
- DELAY_INTEREST
- STATIC_TERMS
- SETTLEMENT_AMOUNT
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
allOf:
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: STATIC_TERMS
required:
- code
value:
type: string
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_TYPE
required:
- code
value:
type: string
required:
- descriptor
- value
- contains:
type: object
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_WINDOW
required:
- code
value:
type: string
required:
- descriptor
- value
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
items:
if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TERMS
then:
properties:
list:
type: array
items:
allOf:
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_WINDOW
then:
properties:
value:
type: string
pattern: '^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$'
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_BASIS
then:
properties:
value:
type: string
enum:
- INVOICE_RECEIPT
- DELIVERY
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: MANDATORY_ARBITRATION
then:
properties:
value:
type: string
pattern: ^(true|false)$
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: STATIC_TERMS
then:
properties:
value:
type: string
format: uri
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: COURT_JURISDICTION
then:
properties:
value:
type: string
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: DELAY_INTEREST
then:
properties:
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_TYPE
then:
properties:
value:
type: string
enum:
- UPI
- NEFT
- RTGS
required:
- descriptor
- value
- if:
properties:
descriptor:
properties:
code:
const: SETTLEMENT_AMOUNT
then:
properties:
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- descriptor
- value
- properties:
message:
properties:
catalog:
properties:
providers:
items:
properties:
payments:
items:
properties:
tags:
allOf:
- contains:
properties:
descriptor:
type: object
properties:
code:
const: BUYER_FINDER_FEES
required:
- code
- contains:
properties:
descriptor:
type: object
properties:
code:
const: SETTLEMENT_TERMS
required:
- code
examples:
Return a mobility catalog with multiple providers:
value:
context:
action: on_search
bap_id: example-bap.in
bap_uri: 'https://api.example-bpp.in/path/to/url'
bpp_id: example-bpp.in
bpp_uri: 'https://api.example-bpp.in/path/to/url'
domain: 'nic2004:60221'
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
version: 1.1.0
message:
catalog:
descriptor:
images:
- 'https://example-bpp.com/images/logos/oms.ico'
name: Open Mobility Solutions
providers:
- descriptor:
images:
- 'https://example-bpp.com/images/logos/acme.ico'
name: Acme Cabs
fulfillments:
- id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5
stops:
- location:
gps: '12.9099828, 77.6118226'
type: start
- location:
gps: '12.9351856, 77.6245996'
type: end
vehicle:
category: TAXI
id: '1'
items:
- descriptor:
name: Economy
fulfillment_ids:
- '1'
id: '1'
payment_ids:
- '1'
price:
currency: INR
value: '175'
- descriptor:
name: Premium
fulfillment_ids:
- '1'
id: '2'
payment_ids:
- '1'
price:
currency: INR
value: '250'
- descriptor:
name: Luxury
fulfillment_ids:
- '1'
id: '3'
payment_ids:
- '1'
price:
currency: INR
value: '500'
payments:
- collected_by: BPP
id: '1'
type: ON-FULFILLMENT
- descriptor:
images:
- 'https://example-bpp.com/images/logos/betataxis.ico'
name: Beta Taxis
fulfillments:
- id: 1
stops:
- location:
gps: '12.9099828, 77.6118226'
type: start
- location:
gps: '12.9351856, 77.62459969999999'
type: end
vehicle:
category: TAXI
- id: 1
stops:
- location:
gps: '12.9099828, 77.6118226'
type: start
- location:
gps: '12.9351856, 77.62459969999999'
type: end
vehicle:
category: TEMPO-TRAVELLER
id: '2'
items:
- descriptor:
name: Beta Prime
short_desc: 'Affordable sedans, at affordable costs'
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: '1'
payment_ids:
- '1'
price:
currency: INR
value: '200'
- descriptor:
name: Beta Max
short_desc: Spacious vans for large groups
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: '2'
payment_ids:
- '1'
price:
currency: INR
value: '1500'
payments:
- collected_by: BPP
id: '1'
type: ON-FULFILLMENT
Return a mobility catalog with no provider:
value:
context:
location:
action: on_search
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
city:
code: 'std:080'
country:
code: IND
domain: 'nic2004:60221'
message_id: 21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee
timestamp: '2023-03-23T04:43:02Z'
transaction_id: 870782be-6757-43f1-945c-8eeaf9536259
version: 1.1.0
message:
catalog:
descriptor:
name: InstaAuto
providers:
- fulfillments:
- id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
id: 1
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
price:
currency: INR
maximum_value: '156'
minimum_value: '176'
value: 156 - 176 INR
locations:
- gps: '12.9164682,77.6089985'
id: '1'
- gps: '12.91671,77.6092983'
id: '2'
- gps: '12.9165733,77.6152167'
id: '3'
- gps: '12.9068578,77.6044567'
id: '4'
payments:
- collected_by: BPP
id: '1'
type: ON-FULFILLMENT
Return a public transit catalog of fare products:
value:
context:
action: on_search
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
catalog:
descriptor:
images:
- 'https://transitsolutions.in/logos/logo.ico'
name: Transit Solutions
providers:
- descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
fulfillments:
- id: 1
stops:
- location:
descriptor:
name: Dwarka Sector 10 - Blue Line
gps: '28.5811261,77.0548206'
type: start
- descriptor:
name: Patel Chowk - Yellow Line
gps: '28.6230972,77.2099917'
location: null
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '1'
- descriptor:
name: Duration
display: true
value: 60 min
vehicle:
category: METRO
- id: '2'
stops:
- location:
descriptor:
name: Dwarka Sector 10 - Blue Line
gps: '28.5811261,77.0548206'
type: start
- location:
descriptor:
name: Shivaji Stadium - Airport Express Line
gps: '28.6288785,77.2085895'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '1'
- descriptor:
name: Duration
display: true
value: 45 min
vehicle:
category: METRO
- id: '3'
stops:
- location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '1'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '1'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '1'
id: '1'
price:
currency: '35'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '2'
id: '2'
price:
currency: '65'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/rjt.ico'
name: Return Journey Ticket
fulfillment_ids:
- '1'
id: '4'
price:
currency: '60'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/rjt.ico'
name: Return Journey Ticket
fulfillment_ids:
- '2'
id: '5'
price:
currency: '90'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/rjt.ico'
name: Return Journey Ticket
fulfillment_ids:
- '3'
id: '6'
price:
currency: '100'
value: INR
- descriptor:
images:
- 'https://delhimetrorail.com/icons/mp.ico'
name: Monthly Pass
id: '7'
price:
currency: INR
value: '250'
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Timetable
display: true
value: 'https://delhimetrorail.com/timetable.html'
- descriptor:
name: GTFS Schedule
display: true
value: 'https://delhimetrorail.com/gtfs'
Return a single provider mobility catalog:
value:
context:
action: on_search
bap_id: example-bap.in
bap_uri: 'https://api.example-bpp.in/path/to/url'
bpp_id: example-bpp.in
bpp_uri: 'https://api.example-bpp.in/path/to/url'
domain: 'nic2004:60221'
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
version: 1.1.0
message:
catalog:
descriptor:
name: Acme Taxis
providers:
- descriptor:
name: Acme Taxis
fulfillments:
- id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: TAXI
id: '1'
items:
- descriptor:
code: RIDE
name: Economy
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
price:
currency: INR
value: '175'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
locations:
- gps: '12.9164682,77.6089985'
id: '1'
- gps: '12.91671,77.6092983'
id: '2'
- gps: '12.9165733,77.6152167'
id: '3'
- gps: '12.9068578,77.6044567'
id: '4'
payments:
- collected_by: BPP
id: '1'
type: ON-FULFILLMENT
Return a single provider mobility catalog (with some optional tags):
value:
context:
action: on_search
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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
version: 1.1.0
message:
catalog:
descriptor:
name: InstaAuto
providers:
- fulfillments:
- id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
price:
currency: INR
maximum_value: '156'
minimum_value: '176'
value: 156 - 176 INR
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
locations:
- gps: '12.9164682,77.6089985'
id: '1'
- gps: '12.91671,77.6092983'
id: '2'
- gps: '12.9165733,77.6152167'
id: '3'
- gps: '12.9068578,77.6044567'
id: '4'
payments:
- collected_by: BPP
id: '1'
type: ON-FULFILLMENT
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- context
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
- Beckn Gateway (BG)
/on_select:
post:
description: Send draft order object with quoted price for selected items
operationId: on_select
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
- message
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_select
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- allOf:
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
minItems: 1
items:
required:
- id
required:
- fulfillments
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
minItems: 1
items:
type: object
properties:
state:
type: object
properties:
descriptor:
type: object
properties:
code:
type: string
enum:
- RIDE_ASSIGNED
- RIDE_ENROUTE_PICKUP
- RIDE_ARRIVED_PICKUP
- RIDE_STARTED
- RIDE_ENDED
- RIDE_CANCELLED
required:
- code
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
minItems: 1
items:
properties:
stops:
items:
properties:
authorization:
type: object
properties:
type:
type: string
enum:
- OTP
- QR
token:
type: string
pattern: ^-?\d+(\.\d+)?$
required:
- type
- token
- properties:
message:
properties:
order:
properties:
fulfillments:
items:
properties:
stops:
allOf:
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: START
required:
- location
- type
- contains:
type: object
properties:
location:
type: object
properties:
gps:
type: string
required:
- gps
type:
const: END
required:
- location
- type
required:
- stops
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
minItems: 1
items:
type: object
properties:
vehicle:
properties:
category:
type: string
enum:
- AUTO_RICKSHAW
- CAB
required:
- category
required:
- vehicle
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7'
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
items:
allOf:
- not:
required:
- agent
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
examples:
Return a quote offered by a public transit service provider:
value:
context:
action: on_select
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
fulfillments:
- id: '3'
stops:
- location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '1'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor: null
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
name: Other Information
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: INR
value: '60.5'
Return a quote offered by a ride hailing service provider:
value:
context:
action: on_select
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
provider:
descriptor:
name: Acme Taxis
id: '1'
quote:
breakup:
- price:
currency: INR
value: '30'
title: Base Fare
- price:
currency: INR
value: '56'
title: Per km fare
price:
currency: INR
value: '76'
ttl: P200S
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_init:
post:
description: Send order object with payment details updated
operationId: on_init
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_init
- properties:
message:
properties:
order:
properties:
provider:
type: object
properties:
id:
type: string
required:
- id
required:
- provider
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- properties:
message:
properties:
order:
properties:
items:
items:
properties:
tags:
allOf:
- contains:
properties:
descriptor:
type: object
properties:
code:
const: FARE_POLICY
required:
- code
- contains:
properties:
descriptor:
type: object
properties:
code:
const: INFO
required:
- code
- properties:
message:
properties:
order:
properties:
items:
type: array
minItems: 1
items:
type: object
properties:
fulfillment_ids:
minItems: 1
location_ids:
minItems: 1
required:
- fulfillment_ids
- location_ids
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3'
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
enum:
- DELIVERY
required:
- type
- allOf:
- properties:
message:
properties:
order:
properties:
quote:
type: object
properties:
price:
type: object
properties:
currency:
type: string
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- currency
- value
breakup:
type: array
items:
type: object
properties:
price:
type: object
properties:
currency:
type: string
value:
type: string
pattern: '^\d+(\.\d{1,2})?$'
required:
- currency
- value
title:
type: string
enum:
- BASE_FARE
- DISTANCE_FARE
- TAX
- DISCOUNT
- WAITING_CHARG
- CANCELLATION_CHARGES
required:
- price
- title
required:
- price
- breakup
required:
- quote
- properties:
message:
properties:
order:
properties:
quote:
properties:
breakup:
allOf:
- contains:
type: object
properties:
title:
const: BASE_FARE
price:
type: object
properties:
value:
type: string
required:
- value
required:
- title
- price
- contains:
type: object
properties:
title:
const: DISTANCE_FARE
price:
type: object
properties:
value:
type: string
required:
- value
required:
- title
- price
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- properties:
message:
properties:
order:
properties:
cancellation_terms:
items:
properties:
fulfillment_state:
properties:
descriptor:
properties:
code:
type: string
enum:
- RIDE_ASSIGNED
- RIDE_ENROUTE_PICKUP
- RIDE_ARRIVED_PICKUP
- RIDE_STARTED
required:
- code
cancellation_fee:
oneOf:
- properties:
percentage:
type: string
pattern: '^(100(\.0{1,2})?|(\d{1,2})(\.\d{1,2})?)$'
required:
- percentage
- properties:
amount:
properties:
value:
type: string
pattern: '^[+-]?(\d+(\.\d*)?|\.\d+)$'
required:
- currency
- value
required:
- amount
required:
- fulfillment_state
- cancellation_fee
required:
- cancellation_terms
- properties:
message:
type: object
required:
- message
examples:
Return draft order for transit ticket with T+1 settlment via bank transfer:
value:
context:
action: on_init
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
cancellation_terms:
- external_ref:
url: 'https://dmrc.com/fare_products/sjt/cancellation_terms.html'
fulfillments:
- id: '3'
stops:
- instructions:
name: 'Show this ticket at the QR code scanner at the entry gate. If the QR code scanner is not present, show this at the ticket counter to get your token'
location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
payment:
params:
amount: '60.5'
bank_account_number: '32756678999'
bank_code: SBIN0000575
currency: INR
transaction_id: '24566345563'
status: NOT-PAID
time:
range:
end: '2021-03-24T10:00:40.065Z'
start: '2021-03-23T10:00:40.065Z'
type: POST-FULFILLMENT
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return draft order for transit ticket with settlement via payment link:
value:
context:
action: on_init
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
cancellation_terms:
- external_ref:
url: 'https://dmrc.com/fare_products/sjt/cancellation_terms.html'
fulfillments:
- id: '3'
stops:
- instructions:
name: 'Show this ticket at the QR code scanner at the entry gate. If the QR code scanner is not present, show this at the ticket counter to get your token'
location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
payments:
- tl_method: GET
type: ON-ORDER
uri: 'https://pay.razorpay.com?amt=60.5&cur=INR&ref=24566345563'
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return draft ride hailing order with payment after ride completion:
value:
context:
action: on_init
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
stops:
- location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_confirm:
post:
description: Send active order object
operationId: on_confirm
requestBody:
content:
application/json:
schema:
allOf:
- type: object
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
$ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
- message
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_confirm
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/6'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- properties:
message:
properties:
order:
properties:
status:
type: string
enum:
- COMPLETE
- ACTIVE
required:
- status
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10'
- properties:
message:
properties:
order:
properties:
status:
type: string
enum:
- COMPLETE
- ACTIVE
- CANCELLED
- SOFT_CANCEL
required:
- status
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/11'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/13'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/12'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/14'
examples:
Return confirmed order with latest fulfillment details:
value:
context:
action: on_confirm
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: DRIVER_EN_ROUTE
name: Driver is on the way
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Tais
id: '1'
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%
price:
currency: INR
value: '81'
Return confirmed ticket order with T+1 pending settlement:
value:
context:
action: on_confirm
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
cancellation_terms:
- external_ref:
url: 'https://dmrc.com/fare_products/sjt/cancellation_terms.html'
fulfillments:
- id: '3'
state:
descriptor:
name: Ticket issued
stops:
- instructions:
name: 'Show this ticket at the QR code scanner at the entry gate. If the QR code scanner is not present, show this at the ticket counter to get your token'
location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
payments:
- params:
amount: '60.5'
bank_account_number: '32756678999'
bank_code: SBIN0000575
currency: INR
transaction_id: '24566345563'
status: NOT-PAID
time:
range:
end: '2021-03-24T10:00:40.065Z'
start: '2021-03-23T10:00:40.065Z'
type: POST-FULFILLMENT
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return confirmed ticket order with payment confirmation:
value:
context:
action: on_confirm
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
cancellation_terms:
- external_ref:
url: 'https://dmrc.com/fare_products/sjt/cancellation_terms.html'
fulfillments:
- id: '3'
stops:
- instructions:
name: 'Show this ticket at the QR code scanner at the entry gate. If the QR code scanner is not present, show this at the ticket counter to get your token'
location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
payments:
- params:
amount: '60.5'
currency: INR
transaction_id: '24566345563'
status: PAID
type: ON-ORDER
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_status:
post:
description: Fetch the status of a Service
operationId: on_status
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
$ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_status
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- allOf:
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/3'
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
items:
allOf:
- properties:
agent:
properties:
contact:
properties:
phone:
type: string
pattern: '^\+?[1-9]\d{1,14}$'
required:
- phone
person:
properties:
name:
type: string
required:
- name
required:
- contact
- person
required:
- agent
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10'
- properties:
message:
properties:
order:
properties:
payments:
type: array
items:
properties:
type:
type: string
params:
type: object
properties:
transaction_id:
type: string
required:
- type
allOf:
- if:
properties:
type:
const: PRE-ORDER
then:
properties:
params:
required:
- transaction_id
- properties:
message:
properties:
order:
properties:
fulfillments:
type: array
items:
properties:
vehicle:
type: object
properties:
registration:
type: string
required:
- registration
- make
- model
required:
- vehicle
- properties:
message:
properties:
order:
properties:
fulfillments:
items:
required:
- state
- properties:
message:
properties:
order:
required:
- id
examples:
Return order with latest fulfillment status - Driver en-route to pickup:
value:
context:
action: on_status
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: DRIVER_EN_ROUTE_TO_PICKUP
name: Driver is en-route to your location
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
Return order with latest status - Ride Ended:
value:
context:
action: on_status
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: RIDE_ENDED
name: Your ride has ended
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
Return order with latest status - Ride started:
value:
context:
action: on_status
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: RIDE_STARTED
name: Your ride has started
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
Return order with status - Driver at pickup:
value:
context:
action: on_status
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: DRIVER_AT_PICKUP
name: Driver Arrived at Pickup Location
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
Return transit ticket order with status - Entered Paid Area:
value:
context:
action: on_status
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
fulfillments:
- id: '3'
state:
descriptor:
name: Entered paid area
stops:
- location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
payments:
- params:
amount: '60.5'
currency: INR
transaction_id: '24566345563'
status: PAID
time:
range:
end: '2021-03-24T10:00:40.065Z'
start: '2021-03-23T10:00:40.065Z'
url: 'https://pay.razorpay.com?amt=60.5&cur=INR&ref=24566345563'
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return transit ticket order with status - Exited paid area:
value:
context:
action: on_status
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
fulfillments:
- id: '3'
state:
descriptor:
name: Exited paid area
stops:
- location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
payments:
- params:
amount: '60.5'
currency: INR
transaction_id: '24566345563'
status: PAID
url: 'https://pay.razorpay.com?amt=60.5&cur=INR&ref=24566345563'
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return transit ticket order with status - Ticket Issued:
value:
context:
action: on_status
bap_id: 'https://example-bap.com'
bap_uri: 'https://mock_bap.com/beckn/'
bpp_id: 'https://kmrl-bpp.com'
bpp_uri: 'https://kmrl-bpp.com/beckn/'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
fulfillments:
- id: '3'
state:
descriptor:
name: Ticket Issued
stops:
- location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
payments:
- params:
amount: '60.5'
currency: INR
transaction_id: '24566345563'
status: PAID
time:
range:
end: '2021-03-24T10:00:40.065Z'
start: '2021-03-23T10:00:40.065Z'
url: 'https://pay.razorpay.com?amt=60.5&cur=INR&ref=24566345563'
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_update:
post:
description: Returns updated service with updated runtime object
operationId: on_update
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- on_update
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_update
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/6'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/11'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/12'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/13'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/14'
examples:
Return updated order with payment transaction status:
value:
context:
action: on_update
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: PAYMENT_COLLECTED
name: Payment received
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: ABC1234
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '81'
currency: INR
status: PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
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%
price:
currency: INR
value: '81'
Return updated order with recomputed charges:
value:
context:
action: on_update
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: RIDE_ENDED
name: Your ride has ended
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: ABC1234
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '75'
currency: INR
status: NOT-PAID
type: ON-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
quote:
breakup:
- price:
currency: INR
value: '30'
title: Base Fare
- price:
currency: INR
value: '40'
title: Per km fare
- price:
currency: INR
value: '2.5'
title: CGST @ 5%
- price:
currency: INR
value: '2.5'
title: SGST @ 5%
price:
currency: INR
value: '75'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_rating:
post:
description: Provide feedback on a service
operationId: on_rating
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- on_rating
error:
$ref: '#/components/schemas/Error'
message:
properties:
feedback_form:
allOf:
- $ref: '#/components/schemas/XInput'
description: A feedback form to allow the user to provide additional information on the rating provided
type: object
required:
- context
- message
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_rating
- properties:
message:
properties:
feedback_form:
type: object
properties:
required:
type: boolean
form:
type: object
required:
- required
allOf:
- if:
properties:
required:
const: true
then:
required:
- form
examples:
Return acknowledgement of rating and feedback:
value:
context:
action: on_rating
bap_id: api.beckn.juspay.in/pilot/bap/cab/v1
bap_uri: 'https://api.example-bap.com/pilot/bap/cab/v1'
bpp_id: 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: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
message_id: 2a17e268-1dc4-4d1a-98a2-17554a50c7d2
timestamp: '2023-03-23T05:41:15Z'
version: 1.1.0
message:
feedback_form:
form:
mime_type: text/html
url: 'https://www.example.com/feedbackform'
required: true
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_support:
post:
description: Contact Support
operationId: on_support
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- on_support
error:
$ref: '#/components/schemas/Error'
message:
properties:
support:
$ref: '#/components/schemas/Support'
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_support
- properties:
message:
properties:
support:
type: object
properties:
email:
type: string
format: email
phone:
type: string
url:
type: string
format: uri
anyOf:
- required:
- email
- required:
- phone
- required:
- url
examples:
Return support information related to an order:
value:
context:
action: on_support
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
message_id: ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba
timestamp: '2023-03-23T05:41:09Z'
version: 1.1.0
message:
support:
callback_phone: '+916756453421'
email: support@example-bpp.com
phone: '+918068870525'
ref_id: 1386183jkgsgfjsf
url: 'https://support.example-bpp.com/gethelp'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_track:
post:
description: Send tracking details of an active order
operationId: on_track
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- on_track
error:
$ref: '#/components/schemas/Error'
message:
properties:
tracking:
$ref: '#/components/schemas/Tracking'
required:
- tracking
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_track
- properties:
message:
properties:
tracking:
type: object
properties:
status:
type: string
url:
type: string
location:
type: object
properties:
latitude:
type: number
longitude:
type: number
required:
- status
oneOf:
- required:
- url
- required:
- location
examples:
Return tracking information for an order:
value:
context:
action: on_track
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
location:
city:
code: 'std:080'
country:
code: IND
message_id: ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba
timestamp: '2023-03-23T05:41:09Z'
version: 1.1.0
message:
tracking:
status: active
url: 'https://api.beckn.juspay.in/dobpp/ui/driver/location/abc9f0aa-bbfd-4e91-b378-41feee12f05f'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
/on_cancel:
post:
description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object
operationId: on_cancel
requestBody:
content:
application/json:
schema:
allOf:
- properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- properties:
action:
enum:
- on_cancel
error:
$ref: '#/components/schemas/Error'
message:
properties:
order:
allOf:
- $ref: '#/components/schemas/Order'
required:
- order
type: object
required:
- context
type: object
- allOf:
- $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0'
- properties:
context:
properties:
action:
type: string
enum:
- on_cancel
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/4'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/6'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/8'
- $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5'
- $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/11'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/12'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/13'
- $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/14'
- properties:
message:
properties:
order:
properties:
status:
type: string
enum:
- CANCELLED
- SOFT_CANCEL
required:
- status
- properties:
message:
properties:
order:
properties:
cancellation_terms:
items:
required:
- reason_required
required:
- cancellation_terms
examples:
Return cancelled ticket order with cancellation charges:
value:
context:
action: on_cancel
bap_id: 'https://example-bap.com'
bap_uri: 'https://api.example-bap.com/beckn/'
bpp_id: 'https://transit-solutions.com'
bpp_uri: 'https://api.transit-solutions.com/beckn/'
domain: 'nic2008:49213'
location:
city:
code: 'std:080'
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:
billing:
email: john.doe@example.com
name: John Doe
cancellation_terms:
- external_ref:
url: 'https://dmrc.com/fare_products/sjt/cancellation_terms.html'
fulfillments:
- id: '3'
state:
descriptor:
name: Ticket Cancelled
stops:
- instructions:
name: 'Show this ticket at the QR code scanner at the entry gate. If the QR code scanner is not present, show this at the ticket counter to get your token'
location:
descriptor:
name: Dwarka Sector 21
gps: '9.05,12.06'
time:
timestamp: '2021-10-15T00:32:19.000Z'
type: start
- location:
descriptor:
name: Shivaji Stadium
gps: '9.07,12.07'
time:
timestamp: '2021-10-15T00:43:21.000Z'
type: end
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Transfers
display: true
value: '0'
- descriptor:
name: Duration
display: true
value: 30 min
vehicle:
category: METRO
id: '123413'
items:
- descriptor:
images:
- 'https://delhimetrorail.com/icons/sjt.ico'
name: Single Journey Ticket
fulfillment_ids:
- '3'
id: '3'
price:
currency: '55'
value: INR
tags:
- descriptor:
name: Other Information
list:
- descriptor:
name: Validity
display: true
value: 24 hours from the time of purchase
payments:
- params:
amount: '10'
bank_account_number: '32756678999'
bank_code: SBIN0000575
currency: INR
status: NOT-PAID
time:
range:
end: '2021-03-24T10:00:40.065Z'
start: '2021-03-23T10:00:40.065Z'
type: POST-FULFILLMENT
provider:
descriptor:
images:
- 'https://delhimetrorail.com/logos/logo.ico'
name: Delhi Metro Rail Limited
id: '1'
quote:
breakup:
- price:
currency: INR
value: '55'
title: Single Journey Ticket X 1
- price:
currency: INR
value: '2.75'
title: CGST @ 5%
- price:
currency: INR
value: '2.75'
title: SGST @ 5%
price:
currency: '60.5'
value: INR
Return order cancelled by rider with cancellation charges:
value:
context:
action: on_cancel
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: RIDE_CANCELLED
name: Oops! The driver had to cancel
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '30'
bank_account_number: '32754478993'
bank_code: SBIN0000575
currency: INR
status: NOT-PAID
time:
duration: P1D
type: POST-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
quote:
breakup:
- price:
currency: INR
value: '30'
title: Cancellation charges
price:
currency: INR
value: '30'
Return order cancelled by the driver:
value:
context:
action: on_cancel
bap_id: example-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/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f'
domain: 'nic2004:60221'
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: 1.1.0
message:
order:
fulfillments:
- agent:
contact:
phone: +91-98978675645
person:
name: RAGHAVENDRA J
rating: '5'
customer:
contact:
phone: +91-9897867564
person:
language:
code: en
name: English
name: John Doe
id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e
state:
descriptor:
code: RIDE_CANCELLED
name: Oops! The driver had to cancel
stops:
- authorization:
token: '234234'
type: OTP
location:
address: '98 A, 6th Main Rd, Uttarahalli Hobli, Ramanjaneyanagar'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Ramanjaneyanagar
gps: '12.910458, 77.543089'
state:
name: Karnataka
type: start
- location:
address: 'Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital'
area_code: 560061
city:
name: Bengaluru
country:
name: India
district: Chikkanna Garden
gps: '12.9535139, 77.5710434'
state:
name: Karnataka
type: end
vehicle:
category: AUTO_RICKSHAW
registration: KA01JG1231
id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68
items:
- descriptor:
code: RIDE
name: Auto Ride
fulfillment_ids:
- fb5c84d4-1b59-4b9d-96b5-9d79107432c5
id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e
payment_ids:
- '1'
tags:
- descriptor:
name: Daytime Charges
list:
- descriptor:
name: Min Fare upto 2 km
display: true
value: ₹ 30 upto 2 km
- descriptor:
name: Rate above Min. Fare
display: true
value: ₹15 / km
- descriptor:
name: Driver Pickup Charges
display: true
value: ₹ 10
- descriptor:
name: Nominal Fare
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 10
- descriptor:
name: Waiting Charges
short_desc: 'Driver may quote extra to cover for traffic, chance of return trip, etc.'
display: true
value: ₹ 0 / min
- descriptor:
name: Night Charges
list:
- descriptor:
name: Night Charges
display: true
value: 1.5x of daytime charges applicable at night from 10 PM to 5 AM
- descriptor:
name: Night Shift Start
display: true
value: '22:00:00'
- descriptor:
name: Night Shift End
display: true
value: '05:00:00'
- descriptor:
name: General Information
list:
- descriptor:
name: Distance to nearest driver
display: true
value: 661 m
- descriptor:
name: Wait time upto
display: true
value: 3 min
payments:
- id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f
params:
amount: '0'
currency: INR
status: NOT-PAID
type: POST-FULFILLMENT
provider:
descriptor:
name: Acme Taxis
id: '1'
quote:
price:
currency: INR
value: '0'
description: TODO
responses:
'200':
content:
application/json:
schema:
properties:
error:
$ref: '#/components/schemas/Error'
message:
properties:
ack:
$ref: '#/components/schemas/Ack'
required:
- ack
type: object
required:
- message
type: object
description: Acknowledgement of message received
tags:
- Beckn App Platform (BAP)
components:
securitySchemes:
SubscriberAuth:
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(BLAKE-512(signing string))"'
in: header
name: Authorization
type: apiKey
schemas:
Ack:
additionalProperties: false
description: 'Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement.'
properties:
status:
description: 'The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`.'
enum:
- ACK
- NACK
type: string
tags:
description: A list of tags containing any additional information sent along with the Acknowledgement.
items:
$ref: '#/components/schemas/TagGroup'
type: array
type: object
AddOn:
additionalProperties: false
description: Describes an add-on
properties:
descriptor:
$ref: '#/components/schemas/Descriptor'
id:
description: 'ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR '
type: string
price:
$ref: '#/components/schemas/Price'
type: object
Address:
description: Describes a postal address.
type: string
Agent:
additionalProperties: false
description: 'Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor''s name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride.'
properties:
contact:
$ref: '#/components/schemas/Contact'
organization:
$ref: '#/components/schemas/Organization'
person:
$ref: '#/components/schemas/Person'
rating:
$ref: '#/components/schemas/Rating/properties/value'
type: object
Authorization:
additionalProperties: false
description: Describes an authorization mechanism
properties:
status:
description: Status of the token
type: string
token:
description: Token used for authorization
type: string
type:
description: Type of authorization mechanism used
type: string
valid_from:
description: Timestamp in RFC3339 format from which token is valid
format: date-time
type: string
valid_to:
description: Timestamp in RFC3339 format until which token is valid
format: date-time
type: string
type: object
Billing:
additionalProperties: false
description: 'Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at'
properties:
address:
allOf:
- $ref: '#/components/schemas/Address'
description: The address of the billable entity
city:
allOf:
- $ref: '#/components/schemas/City'
description: The city where the billable entity resides.
email:
description: Email address where the bill is sent to
format: email
type: string
name:
description: Name of the billable entity
type: string
organization:
allOf:
- $ref: '#/components/schemas/Organization'
description: Details of the organization being billed.
phone:
description: Phone number of the billable entity
type: string
state:
allOf:
- $ref: '#/components/schemas/State'
description: The state where the billable entity resides. This is important for state-level tax calculation
tax_id:
description: ID of the billable entity as recognized by the taxation authority
type: string
time:
allOf:
- $ref: '#/components/schemas/Time'
description: Details regarding the billing period
type: object
Cancellation:
additionalProperties: false
description: Describes a cancellation event
properties:
additional_description:
allOf:
- $ref: '#/components/schemas/Descriptor'
description: Any additional information regarding the nature of cancellation
cancelled_by:
type: string
reason:
allOf:
- $ref: '#/components/schemas/Option'
description: The reason for cancellation
time:
description: Date-time when the order was cancelled by the buyer
format: date-time
type: string
type: object
CancellationTerm:
additionalProperties: false
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.
properties:
cancel_by:
allOf:
- $ref: '#/components/schemas/Time'
description: Information related to the time of cancellation.
cancellation_fee:
$ref: '#/components/schemas/Fee'
external_ref:
$ref: '#/components/schemas/MediaFile'
fulfillment_state:
allOf:
- $ref: '#/components/schemas/FulfillmentState'
description: The state of fulfillment during which this term is applicable.
reason_required:
description: Indicates whether a reason is required to cancel the order
type: boolean
xinput:
$ref: '#/components/schemas/XInput'
required:
- cancellation_fee
type: object
Catalog:
additionalProperties: false
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.