From 14b15c3847db0f43192c84b46eba13f487f1ea83 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 12 Jun 2024 08:34:40 +0530 Subject: [PATCH 01/12] adding domain specific rules/restrictions in the mobility on deamnd rides layer2 config --- .../mobility_ondemandride_1.1.0.yaml | 387 +++++++++++++++++- 1 file changed, 370 insertions(+), 17 deletions(-) diff --git a/api/l2-config/mobility_ondemandride_1.1.0.yaml b/api/l2-config/mobility_ondemandride_1.1.0.yaml index 3f98cb3..c6b6572 100644 --- a/api/l2-config/mobility_ondemandride_1.1.0.yaml +++ b/api/l2-config/mobility_ondemandride_1.1.0.yaml @@ -137,7 +137,8 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' required: - order required: @@ -358,7 +359,10 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing required: - order required: @@ -505,7 +509,11 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing + - payments required: - order required: @@ -752,6 +760,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order_id: $ref: '#/components/schemas/Order/properties/id' @@ -956,6 +965,8 @@ paths: description: Updated order object allOf: - $ref: '#/components/schemas/Order' + required: + - id required: - update_target - order @@ -1008,6 +1019,7 @@ paths: properties: ratings: type: array + minItems: 1 items: $ref: '#/components/schemas/Rating' required: @@ -1085,6 +1097,8 @@ paths: properties: support: $ref: '#/components/schemas/Support' + required: + - ref_id required: - context - message @@ -1853,7 +1867,15 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + required: + - order required: - order error: @@ -2129,7 +2151,15 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + - billing + - payments required: - order error: @@ -2554,7 +2584,27 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -3074,7 +3124,30 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id + - cancellation required: - order error: @@ -3551,7 +3624,29 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -3934,7 +4029,29 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -5033,7 +5150,15 @@ paths: type: object properties: support: - $ref: '#/components/schemas/Support' + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url error: $ref: '#/components/schemas/Error' required: @@ -5095,6 +5220,7 @@ components: Ack: 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.' type: object + additionalProperties: false properties: status: type: string @@ -5110,6 +5236,7 @@ components: AddOn: description: Describes an add-on type: object + additionalProperties: false properties: id: type: string @@ -5123,6 +5250,8 @@ components: type: string Agent: description: 'Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor''s name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride.' + type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -5135,6 +5264,7 @@ components: Authorization: description: Describes an authorization mechanism type: object + additionalProperties: false properties: type: type: string @@ -5156,6 +5286,7 @@ components: Billing: description: 'Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at' type: object + additionalProperties: false properties: name: description: Name of the billable entity @@ -5193,6 +5324,7 @@ components: Cancellation: description: Describes a cancellation event type: object + additionalProperties: false properties: time: description: Date-time when the order was cancelled by the buyer @@ -5211,9 +5343,13 @@ components: description: Any additional information regarding the nature of cancellation allOf: - $ref: '#/components/schemas/Descriptor' + required: + - time + - cancelled_by CancellationTerm: description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -5232,15 +5368,20 @@ components: $ref: '#/components/schemas/XInput' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - cancel_by + - cancellation_fee Catalog: description: 'Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
' type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' fulfillments: description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' payments: @@ -5255,8 +5396,37 @@ components: $ref: '#/components/schemas/Offer' providers: type: array + minItems: 1 items: - $ref: '#/components/schemas/Provider' + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - descriptor + - price + - category_ids + - fulfillment_ids + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - id + - categories + - descriptor + - items exp: description: Timestamp after which catalog will expire type: string @@ -5264,9 +5434,12 @@ components: ttl: description: Duration in seconds after which this catalog will expire type: string + required: + - providers Category: description: A label under which a collection of items can be grouped. type: object + additionalProperties: false properties: id: description: ID of the category @@ -5286,6 +5459,7 @@ components: Circle: description: Describes a circular region of a specified radius centered at a specified GPS coordinate. type: object + additionalProperties: false properties: gps: $ref: '#/components/schemas/Gps' @@ -5295,6 +5469,7 @@ components: City: description: Describes a city type: object + additionalProperties: false properties: name: type: string @@ -5304,6 +5479,7 @@ components: description: City code Contact: type: object + additionalProperties: false properties: phone: type: string @@ -5315,6 +5491,7 @@ components: Context: description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' type: object + additionalProperties: false properties: domain: description: Domain code that is relevant to this transaction context @@ -5324,6 +5501,9 @@ components: description: The location where the transaction is intended to be fulfilled. allOf: - $ref: '#/components/schemas/Location' + required: + - country + - city action: description: The Beckn protocol method being called by the sender and executed at the receiver. type: string @@ -5335,6 +5515,8 @@ components: allOf: - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' type: string + not: + format: uri bap_uri: description: Subscriber URL of the BAP for accepting callbacks from BPPs. allOf: @@ -5378,6 +5560,7 @@ components: Country: description: Describes a country. type: object + additionalProperties: false properties: name: type: string @@ -5388,6 +5571,7 @@ components: Credential: description: Describes a credential of an entity - Person or Organization type: object + additionalProperties: false properties: id: type: string @@ -5401,6 +5585,7 @@ components: Customer: description: Describes a customer buying/availing a product or a service type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -5413,6 +5598,7 @@ components: Descriptor: description: Physical description of something. type: object + additionalProperties: false properties: name: type: string @@ -5444,6 +5630,7 @@ components: Domain: description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' type: object + additionalProperties: false properties: name: description: Name of the domain @@ -5463,6 +5650,7 @@ components: Error: description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' type: object + additionalProperties: false properties: code: type: string @@ -5476,6 +5664,7 @@ components: Fee: description: A fee applied on a particular entity type: object + additionalProperties: false properties: percentage: description: Percentage of a value @@ -5488,6 +5677,7 @@ components: Form: description: Describes a form type: object + additionalProperties: false properties: url: description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' @@ -5510,6 +5700,7 @@ components: Fulfillment: description: Describes how a an order will be rendered/fulfilled to the end-customer type: object + additionalProperties: false properties: id: description: Unique reference ID to the fulfillment of an order @@ -5559,12 +5750,14 @@ components: FulfillmentState: description: Describes the state of fulfillment type: object + additionalProperties: false properties: descriptor: allOf: - $ref: '#/components/schemas/Descriptor' - properties: - code: + code: + type: string enum: - DRIVER_EN_ROUTE_TO_PICKUP - DRIVER_AT_PICKUP @@ -5585,6 +5778,7 @@ components: Image: description: Describes an image type: object + additionalProperties: false properties: url: description: URL to the image. This can be a data url or an remote url @@ -5606,9 +5800,12 @@ components: height: description: Height of the image in pixels type: string + required: + - url Intent: description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,' type: object + additionalProperties: false properties: descriptor: description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' @@ -5645,6 +5842,7 @@ components: ItemQuantity: description: Describes the count or amount of an item type: object + additionalProperties: false properties: allocated: description: This represents the exact quantity allocated for purchase of the item. @@ -5704,6 +5902,7 @@ components: Item: description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' type: object + additionalProperties: false properties: id: description: ID of the item. @@ -5829,6 +6028,7 @@ components: Location: description: The physical location of something type: object + additionalProperties: false properties: id: type: string @@ -5878,6 +6078,7 @@ components: MediaFile: description: This object contains a url to a media file. type: object + additionalProperties: false properties: mimetype: description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' @@ -5895,6 +6096,7 @@ components: Offer: description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. type: object + additionalProperties: false properties: id: type: string @@ -5921,6 +6123,7 @@ components: Option: description: Describes a selectable option type: object + additionalProperties: false properties: id: type: string @@ -5929,6 +6132,7 @@ components: Order: description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. type: object + additionalProperties: false properties: id: type: string @@ -5960,6 +6164,7 @@ components: items: description: The items purchased / availed in this order type: array + minItems: 1 items: $ref: '#/components/schemas/Item' add_ons: @@ -5979,6 +6184,7 @@ components: fulfillments: description: The fulfillments involved in completing this order type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' cancellation: @@ -6030,9 +6236,104 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + BAPOrder: + description: Describes the order details from the perspective of the BAP. Contains the order details sent from a BAP to BPP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + required: + - id + items: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Item' + required: + - id + fulfillments: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Fulfillment' + required: + - id + required: + - provider + - items + - fulfillments + BPPOrder: + description: Describes the order details from the perspective of the BPP. Contains the order details sent from a BPP to BAP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + required: + - id + - descriptor + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - id + - descriptor + - price + fulfillments: + type: array + items: + required: + - id + - type + required: + - provider + - items + - fulfillments Organization: description: An organization. Usually a recognized business entity. type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' @@ -6053,6 +6354,7 @@ components: Payment: description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' type: object + additionalProperties: false properties: id: description: ID of the payment term that can be referred at an item or an order level in a catalog @@ -6090,6 +6392,9 @@ components: type: string source_virtual_payment_address: type: string + required: + - amount + - currency type: type: string enum: @@ -6108,9 +6413,14 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + required: + - collected_by + - type + - status Person: description: Describes a person as any individual type: object + additionalProperties: false properties: id: type: string @@ -6166,6 +6476,7 @@ components: Price: description: Describes the price of an item. Allows for domain extension. type: object + additionalProperties: false properties: currency: type: string @@ -6186,6 +6497,7 @@ components: Provider: description: Describes the catalog of a business. type: object + additionalProperties: false properties: id: type: string @@ -6201,6 +6513,7 @@ components: $ref: '#/components/schemas/Time' categories: type: array + minItems: 1 items: $ref: '#/components/schemas/Category' fulfillments: @@ -6221,6 +6534,7 @@ components: $ref: '#/components/schemas/Offer' items: type: array + minItems: 1 items: $ref: '#/components/schemas/Item' exp: @@ -6241,6 +6555,7 @@ components: Quotation: description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' type: object + additionalProperties: false properties: id: description: ID of the quote. @@ -6250,9 +6565,13 @@ components: description: The total quoted price allOf: - $ref: '#/components/schemas/Price' + required: + - currency + - value breakup: description: the breakup of the total quoted price type: array + minItems: 1 items: type: object properties: @@ -6266,12 +6585,24 @@ components: - DISCOUNT - WAITING CHARGE price: - $ref: '#/components/schemas/Price' + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - title + - price ttl: $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl Rating: description: Describes the rating of an entity type: object + additionalProperties: false properties: rating_category: description: Category of the entity being rated @@ -6286,9 +6617,14 @@ components: value: description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' type: string + required: + - rating_category + - id + - value Region: description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. type: object + additionalProperties: false properties: dimensions: description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' @@ -6315,6 +6651,7 @@ components: ReplacementTerm: description: The replacement policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -6326,9 +6663,12 @@ components: - $ref: '#/components/schemas/Time' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - replace_within ReturnTerm: description: Describes the return policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term IETF''s applicable. @@ -6351,9 +6691,12 @@ components: enum: - CONSUMER - PROVIDER + required: + - return_time Scalar: description: Describes a scalar type: object + additionalProperties: false properties: type: type: string @@ -6378,6 +6721,7 @@ components: Schedule: description: Describes a schedule type: object + additionalProperties: false properties: frequency: $ref: '#/components/schemas/Duration' @@ -6394,6 +6738,7 @@ components: State: description: A bounded geopolitical region of governance inside a country. type: object + additionalProperties: false properties: name: type: string @@ -6404,6 +6749,7 @@ components: Stop: description: A logical point in space and time during the fulfillment of an order. type: object + additionalProperties: false properties: id: type: string @@ -6440,24 +6786,28 @@ components: Support: description: Details of customer support type: object + additionalProperties: false properties: ref_id: type: string callback_phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' email: type: string format: email url: type: string format: uri + required: + - ref_id Tag: description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' type: object + additionalProperties: false properties: descriptor: description: 'Description of the Tag, can be used to store detailed information.' @@ -6472,6 +6822,7 @@ components: TagGroup: description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' type: object + additionalProperties: false properties: display: description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' @@ -6486,11 +6837,10 @@ components: type: array items: $ref: '#/components/schemas/Tag' - - Time: description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations type: object + additionalProperties: false properties: label: type: string @@ -6517,6 +6867,7 @@ components: Tracking: description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. type: object + additionalProperties: false properties: id: description: A unique tracking reference number @@ -6538,6 +6889,7 @@ components: Vehicle: description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' type: object + additionalProperties: false properties: category: type: string @@ -6570,6 +6922,7 @@ components: XInput: description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' type: object + additionalProperties: false properties: form: $ref: '#/components/schemas/Form' From a51fa56b693b0a50615090a993ea3c7bf2a0586d Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 13 Jun 2024 19:22:40 +0530 Subject: [PATCH 02/12] adding domain specific rules in the mobility transit ticket use case --- .../mobility_transitticket_1.1.0.yaml | 474 +++++++++++++++++- 1 file changed, 460 insertions(+), 14 deletions(-) diff --git a/api/l2-config/mobility_transitticket_1.1.0.yaml b/api/l2-config/mobility_transitticket_1.1.0.yaml index 4c48808..1484dbe 100644 --- a/api/l2-config/mobility_transitticket_1.1.0.yaml +++ b/api/l2-config/mobility_transitticket_1.1.0.yaml @@ -18,6 +18,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -28,6 +29,7 @@ paths: - search message: type: object + additionalProperties: false properties: intent: $ref: '#/components/schemas/Intent' @@ -99,9 +101,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -122,6 +126,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -135,9 +140,11 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' required: - order required: @@ -320,9 +327,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -343,6 +352,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -356,9 +366,13 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing required: - order required: @@ -467,9 +481,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -490,6 +506,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -503,9 +520,14 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing + - payments required: - order required: @@ -624,9 +646,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -647,6 +671,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -660,6 +685,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order_id: $ref: '#/components/schemas/Order/properties/id' @@ -716,9 +742,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -739,6 +767,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -752,6 +781,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order_id: $ref: '#/components/schemas/Order/properties/id' @@ -791,9 +821,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -814,6 +846,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -827,6 +860,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order_id: $ref: '#/components/schemas/Order/properties/id' @@ -912,9 +946,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -935,6 +971,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -948,6 +985,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: update_target: description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' @@ -956,6 +994,8 @@ paths: description: Updated order object allOf: - $ref: '#/components/schemas/Order' + required: + - id required: - update_target - order @@ -969,9 +1009,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -992,6 +1034,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -1005,9 +1048,11 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: ratings: type: array + minItems: 1 items: $ref: '#/components/schemas/Rating' required: @@ -1044,9 +1089,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -1069,6 +1116,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -1082,9 +1130,12 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: support: $ref: '#/components/schemas/Support' + required: + - ref_id required: - context - message @@ -1119,9 +1170,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -1143,6 +1196,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -1155,6 +1209,7 @@ paths: - action message: type: object + additionalProperties: false properties: catalog: $ref: '#/components/schemas/Catalog' @@ -1815,9 +1870,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -1838,6 +1895,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -1851,9 +1909,16 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote required: - order error: @@ -2091,9 +2156,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -2114,6 +2181,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -2127,9 +2195,18 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + - billing + - payments required: - order error: @@ -2516,9 +2593,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -2539,6 +2618,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -2552,9 +2632,30 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -2962,9 +3063,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -2985,6 +3088,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -2998,6 +3102,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: tracking: $ref: '#/components/schemas/Tracking' @@ -3036,9 +3141,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -3059,6 +3166,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -3072,9 +3180,33 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id + - cancellation required: - order error: @@ -3513,9 +3645,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -3536,6 +3670,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -3549,9 +3684,32 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -3896,9 +4054,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -3919,6 +4079,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -3932,9 +4093,32 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - id required: - order error: @@ -4918,9 +5102,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -4941,6 +5127,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -4954,6 +5141,7 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: feedback_form: description: A feedback form to allow the user to provide additional information on the rating provided @@ -4995,9 +5183,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -5018,6 +5208,7 @@ paths: application/json: schema: type: object + additionalProperties: false properties: context: allOf: @@ -5031,9 +5222,18 @@ paths: - bpp_uri message: type: object + additionalProperties: false properties: support: - $ref: '#/components/schemas/Support' + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url error: $ref: '#/components/schemas/Error' required: @@ -5070,9 +5270,11 @@ paths: application/json: schema: type: object + additionalProperties: false properties: message: type: object + additionalProperties: false properties: ack: $ref: '#/components/schemas/Ack' @@ -5095,6 +5297,7 @@ components: Ack: 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.' type: object + additionalProperties: false properties: status: type: string @@ -5110,6 +5313,7 @@ components: AddOn: description: Describes an add-on type: object + additionalProperties: false properties: id: type: string @@ -5123,6 +5327,8 @@ components: type: string Agent: description: 'Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor''s name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride.' + type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -5135,6 +5341,7 @@ components: Authorization: description: Describes an authorization mechanism type: object + additionalProperties: false properties: type: type: string @@ -5156,6 +5363,7 @@ components: Billing: description: 'Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at' type: object + additionalProperties: false properties: name: description: Name of the billable entity @@ -5193,6 +5401,7 @@ components: Cancellation: description: Describes a cancellation event type: object + additionalProperties: false properties: time: description: Date-time when the order was cancelled by the buyer @@ -5211,9 +5420,13 @@ components: description: Any additional information regarding the nature of cancellation allOf: - $ref: '#/components/schemas/Descriptor' + required: + - time + - cancelled_by CancellationTerm: description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -5232,15 +5445,20 @@ components: $ref: '#/components/schemas/XInput' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - cancel_by + - cancellation_fee Catalog: description: 'Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
' type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' fulfillments: description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' payments: @@ -5255,8 +5473,37 @@ components: $ref: '#/components/schemas/Offer' providers: type: array + minItems: 1 items: - $ref: '#/components/schemas/Provider' + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - descriptor + - price + - category_ids + - fulfillment_ids + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - id + - categories + - descriptor + - items exp: description: Timestamp after which catalog will expire type: string @@ -5264,9 +5511,12 @@ components: ttl: description: Duration in seconds after which this catalog will expire type: string + required: + - providers Category: description: A label under which a collection of items can be grouped. type: object + additionalProperties: false properties: id: description: ID of the category @@ -5286,6 +5536,7 @@ components: Circle: description: Describes a circular region of a specified radius centered at a specified GPS coordinate. type: object + additionalProperties: false properties: gps: $ref: '#/components/schemas/Gps' @@ -5294,6 +5545,7 @@ components: City: description: Describes a city type: object + additionalProperties: false properties: name: type: string @@ -5303,6 +5555,7 @@ components: description: City code Contact: type: object + additionalProperties: false properties: phone: type: string @@ -5314,6 +5567,7 @@ components: Context: description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' type: object + additionalProperties: false properties: domain: description: Domain code that is relevant to this transaction context @@ -5323,6 +5577,9 @@ components: description: The location where the transaction is intended to be fulfilled. allOf: - $ref: '#/components/schemas/Location' + required: + - country + - city action: description: The Beckn protocol method being called by the sender and executed at the receiver. type: string @@ -5334,6 +5591,8 @@ components: allOf: - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' type: string + not: + format: uri bap_uri: description: Subscriber URL of the BAP for accepting callbacks from BPPs. allOf: @@ -5377,6 +5636,7 @@ components: Country: description: Describes a country. type: object + additionalProperties: false properties: name: type: string @@ -5387,6 +5647,7 @@ components: Credential: description: Describes a credential of an entity - Person or Organization type: object + additionalProperties: false properties: id: type: string @@ -5400,6 +5661,7 @@ components: Customer: description: Describes a customer buying/availing a product or a service type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -5412,6 +5674,7 @@ components: Descriptor: description: Physical description of something. type: object + additionalProperties: false properties: name: type: string @@ -5423,6 +5686,7 @@ components: type: string additional_desc: type: object + additionalProperties: false properties: url: type: string @@ -5443,6 +5707,7 @@ components: Domain: description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' type: object + additionalProperties: false properties: name: description: Name of the domain @@ -5462,6 +5727,7 @@ components: Error: description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' type: object + additionalProperties: false properties: code: type: string @@ -5475,6 +5741,7 @@ components: Fee: description: A fee applied on a particular entity type: object + additionalProperties: false properties: percentage: description: Percentage of a value @@ -5487,6 +5754,7 @@ components: Form: description: Describes a form type: object + additionalProperties: false properties: url: description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' @@ -5509,6 +5777,7 @@ components: Fulfillment: description: Describes how a an order will be rendered/fulfilled to the end-customer type: object + additionalProperties: false properties: id: description: Unique reference ID to the fulfillment of an order @@ -5558,12 +5827,14 @@ components: FulfillmentState: description: Describes the state of fulfillment type: object + additionalProperties: false properties: descriptor: allOf: - $ref: '#/components/schemas/Descriptor' - properties: code: + type: string enum: - TICKET_ISSUED - ENTERED_PAID_AREA @@ -5581,6 +5852,7 @@ components: Image: description: Describes an image type: object + additionalProperties: false properties: url: description: URL to the image. This can be a data url or an remote url @@ -5602,9 +5874,12 @@ components: height: description: Height of the image in pixels type: string + required: + - url Intent: description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,' type: object + additionalProperties: false properties: descriptor: description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' @@ -5641,10 +5916,12 @@ components: ItemQuantity: description: Describes the count or amount of an item type: object + additionalProperties: false properties: allocated: description: This represents the exact quantity allocated for purchase of the item. type: object + additionalProperties: false properties: count: type: integer @@ -5654,6 +5931,7 @@ components: available: description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this type: object + additionalProperties: false properties: count: type: integer @@ -5663,6 +5941,7 @@ components: maximum: description: This represents the maximum quantity allowed for purchase of the item type: object + additionalProperties: false properties: count: type: integer @@ -5672,6 +5951,7 @@ components: minimum: description: This represents the minimum quantity allowed for purchase of the item type: object + additionalProperties: false properties: count: type: integer @@ -5681,6 +5961,7 @@ components: selected: description: This represents the quantity selected for purchase of the item type: object + additionalProperties: false properties: count: type: integer @@ -5690,6 +5971,7 @@ components: unitized: description: This represents the quantity available in a single unit of the item type: object + additionalProperties: false properties: count: type: integer @@ -5700,6 +5982,7 @@ components: Item: description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' type: object + additionalProperties: false properties: id: description: ID of the item. @@ -5767,6 +6050,7 @@ components: items: description: Refund term of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -5825,6 +6109,7 @@ components: Location: description: The physical location of something type: object + additionalProperties: false properties: id: type: string @@ -5874,6 +6159,7 @@ components: MediaFile: description: This object contains a url to a media file. type: object + additionalProperties: false properties: mimetype: description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' @@ -5891,6 +6177,7 @@ components: Offer: description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. type: object + additionalProperties: false properties: id: type: string @@ -5917,6 +6204,7 @@ components: Option: description: Describes a selectable option type: object + additionalProperties: false properties: id: type: string @@ -5925,6 +6213,7 @@ components: Order: description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. type: object + additionalProperties: false properties: id: type: string @@ -5956,6 +6245,7 @@ components: items: description: The items purchased / availed in this order type: array + minItems: 1 items: $ref: '#/components/schemas/Item' add_ons: @@ -5975,6 +6265,7 @@ components: fulfillments: description: The fulfillments involved in completing this order type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' cancellation: @@ -6026,9 +6317,104 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + BAPOrder: + description: Describes the order details from the perspective of the BAP. Contains the order details sent from a BAP to BPP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + required: + - id + items: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Item' + required: + - id + fulfillments: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Fulfillment' + required: + - id + required: + - provider + - items + - fulfillments + BPPOrder: + description: Describes the order details from the perspective of the BPP. Contains the order details sent from a BPP to BAP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + required: + - id + - descriptor + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - id + - descriptor + - price + fulfillments: + type: array + items: + required: + - id + - type + required: + - provider + - items + - fulfillments Organization: description: An organization. Usually a recognized business entity. type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' @@ -6049,6 +6435,7 @@ components: Payment: description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' type: object + additionalProperties: false properties: id: description: ID of the payment term that can be referred at an item or an order level in a catalog @@ -6065,6 +6452,7 @@ components: format: uri params: type: object + additionalProperties: false properties: transaction_id: type: string @@ -6085,6 +6473,9 @@ components: type: string source_virtual_payment_address: type: string + required: + - amount + - currency type: type: string enum: @@ -6103,9 +6494,14 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + required: + - collected_by + - type + - status Person: description: Describes a person as any individual type: object + additionalProperties: false properties: id: type: string @@ -6139,6 +6535,7 @@ components: items: description: Describes a language known to the person. type: object + additionalProperties: false properties: code: type: string @@ -6149,6 +6546,7 @@ components: items: description: Describes a skill of the person. type: object + additionalProperties: false properties: code: type: string @@ -6161,6 +6559,7 @@ components: Price: description: Describes the price of an item. Allows for domain extension. type: object + additionalProperties: false properties: currency: type: string @@ -6181,6 +6580,7 @@ components: Provider: description: Describes the catalog of a business. type: object + additionalProperties: false properties: id: type: string @@ -6196,6 +6596,7 @@ components: $ref: '#/components/schemas/Time' categories: type: array + minItems: 1 items: $ref: '#/components/schemas/Category' fulfillments: @@ -6216,6 +6617,7 @@ components: $ref: '#/components/schemas/Offer' items: type: array + minItems: 1 items: $ref: '#/components/schemas/Item' exp: @@ -6236,6 +6638,7 @@ components: Quotation: description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' type: object + additionalProperties: false properties: id: description: ID of the quote. @@ -6245,11 +6648,16 @@ components: description: The total quoted price allOf: - $ref: '#/components/schemas/Price' + required: + - currency + - value breakup: description: the breakup of the total quoted price type: array + minItems: 1 items: type: object + additionalProperties: false properties: item: $ref: '#/components/schemas/Item' @@ -6260,12 +6668,24 @@ components: - TAX - DISCOUNT price: - $ref: '#/components/schemas/Price' + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - title + - price ttl: $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl Rating: description: Describes the rating of an entity type: object + additionalProperties: false properties: rating_category: description: Category of the entity being rated @@ -6279,9 +6699,14 @@ components: value: description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' type: string + required: + - rating_category + - id + - value Region: description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. type: object + additionalProperties: false properties: dimensions: description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' @@ -6308,6 +6733,7 @@ components: ReplacementTerm: description: The replacement policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -6319,9 +6745,12 @@ components: - $ref: '#/components/schemas/Time' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - replace_within ReturnTerm: description: Describes the return policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term IETF''s applicable. @@ -6344,9 +6773,12 @@ components: enum: - CONSUMER - PROVIDER + required: + - return_time Scalar: description: Describes a scalar type: object + additionalProperties: false properties: type: type: string @@ -6361,6 +6793,7 @@ components: $ref: '#/components/schemas/DecimalValue' range: type: object + additionalProperties: false properties: min: $ref: '#/components/schemas/DecimalValue' @@ -6371,6 +6804,7 @@ components: Schedule: description: Describes a schedule type: object + additionalProperties: false properties: frequency: $ref: '#/components/schemas/Duration' @@ -6387,6 +6821,7 @@ components: State: description: A bounded geopolitical region of governance inside a country. type: object + additionalProperties: false properties: name: type: string @@ -6397,6 +6832,7 @@ components: Stop: description: A logical point in space and time during the fulfillment of an order. type: object + additionalProperties: false properties: id: type: string @@ -6433,24 +6869,28 @@ components: Support: description: Details of customer support type: object + additionalProperties: false properties: ref_id: type: string callback_phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' email: type: string format: email url: type: string format: uri + required: + - ref_id Tag: description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' type: object + additionalProperties: false properties: descriptor: description: 'Description of the Tag, can be used to store detailed information.' @@ -6465,6 +6905,7 @@ components: TagGroup: description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' type: object + additionalProperties: false properties: display: description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' @@ -6484,6 +6925,7 @@ components: Time: description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations type: object + additionalProperties: false properties: label: type: string @@ -6494,6 +6936,7 @@ components: $ref: '#/components/schemas/Duration' range: type: object + additionalProperties: false properties: start: type: string @@ -6510,6 +6953,7 @@ components: Tracking: description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. type: object + additionalProperties: false properties: id: description: A unique tracking reference number @@ -6531,6 +6975,7 @@ components: Vehicle: description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' type: object + additionalProperties: false properties: category: type: string @@ -6563,6 +7008,7 @@ components: XInput: description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' type: object + additionalProperties: false properties: form: $ref: '#/components/schemas/Form' From fd51ecf1e71e5dbc70f9b35117e0e6954ad1f193 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Fri, 14 Jun 2024 11:33:25 +0530 Subject: [PATCH 03/12] fixing examples in the layer2 config file --- api/l2-config/mobility_transitticket_1.1.0.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/l2-config/mobility_transitticket_1.1.0.yaml b/api/l2-config/mobility_transitticket_1.1.0.yaml index 1484dbe..93214f8 100644 --- a/api/l2-config/mobility_transitticket_1.1.0.yaml +++ b/api/l2-config/mobility_transitticket_1.1.0.yaml @@ -6341,8 +6341,18 @@ components: items: allOf: - $ref: '#/components/schemas/Fulfillment' + - properties: + stops: + type: array + minItems: 2 + items: + allOf: + - $ref: '#/components/schemas/Stop' + required: + - location required: - - id + - stops + required: - provider - items From 4a926a90988ba366019badeb2a4afd79a679db1f Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 25 Jun 2024 10:08:01 +0530 Subject: [PATCH 04/12] search intent should have fulfillments info --- api/l2-config/mobility_ondemandride_1.1.0.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/l2-config/mobility_ondemandride_1.1.0.yaml b/api/l2-config/mobility_ondemandride_1.1.0.yaml index c6b6572..38bc722 100644 --- a/api/l2-config/mobility_ondemandride_1.1.0.yaml +++ b/api/l2-config/mobility_ondemandride_1.1.0.yaml @@ -1876,8 +1876,6 @@ paths: - quote required: - order - required: - - order error: $ref: '#/components/schemas/Error' required: @@ -5515,8 +5513,8 @@ components: allOf: - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' type: string - not: - format: uri + - not: + format: uri bap_uri: description: Subscriber URL of the BAP for accepting callbacks from BPPs. allOf: @@ -5738,6 +5736,7 @@ components: stops: description: The list of logical stops encountered during the fulfillment of an order. type: array + minItems: 1 items: $ref: '#/components/schemas/Stop' path: @@ -5747,6 +5746,8 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + required: + - stops FulfillmentState: description: Describes the state of fulfillment type: object @@ -5839,6 +5840,8 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + required: + - fulfillment ItemQuantity: description: Describes the count or amount of an item type: object From 89c697b1f443ed4eda1c2f2e7bd0c1b23a5acb58 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 25 Jun 2024 10:10:04 +0530 Subject: [PATCH 05/12] min lenght change --- api/l2-config/mobility_ondemandride_1.1.0.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/l2-config/mobility_ondemandride_1.1.0.yaml b/api/l2-config/mobility_ondemandride_1.1.0.yaml index 38bc722..2042dff 100644 --- a/api/l2-config/mobility_ondemandride_1.1.0.yaml +++ b/api/l2-config/mobility_ondemandride_1.1.0.yaml @@ -5736,7 +5736,7 @@ components: stops: description: The list of logical stops encountered during the fulfillment of an order. type: array - minItems: 1 + minItems: 2 items: $ref: '#/components/schemas/Stop' path: From af179a7658484b050a810e5ddd99cc841379f7ef Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 16 Jul 2024 16:40:35 +0530 Subject: [PATCH 06/12] temp non working changes: just saving the work --- .../mobility_ondemandride_1.1.0.yaml | 4 +- ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 7253 +++++++++++++++++ api/l2-config/option1/README | 2 + .../option1/example-jsons/cancel.yaml | 64 + .../option1/example-jsons/confirm.yaml | 105 + api/l2-config/option1/example-jsons/init.yaml | 95 + .../option1/example-jsons/on_cancel.yaml | 432 + .../option1/example-jsons/on_confirm.yaml | 400 + .../option1/example-jsons/on_init.yaml | 377 + .../option1/example-jsons/on_rating.yaml | 23 + .../option1/example-jsons/on_search.yaml | 648 ++ .../option1/example-jsons/on_select.yaml | 226 + .../option1/example-jsons/on_status.yaml | 981 +++ .../option1/example-jsons/on_support.yaml | 24 + .../option1/example-jsons/on_track.yaml | 21 + .../option1/example-jsons/on_update.yaml | 338 + .../option1/example-jsons/rating.yaml | 23 + .../option1/example-jsons/search.yaml | 57 + .../option1/example-jsons/select.yaml | 169 + .../option1/example-jsons/status.yaml | 40 + .../option1/example-jsons/support.yaml | 23 + .../option1/example-jsons/track.yaml | 20 + .../option1/example-jsons/update.yaml | 0 .../option1/example-rules/search/rule1.yaml | 23 + .../option1/example-rules/search/rule2.yaml | 23 + .../option1/example-rules/search/search.yaml | 3 + .../example-rules/shared-rules/BAPOrder.yaml | 23 + .../example-rules/shared-rules/BPPOrder.yaml | 75 + api/l2-config/option1/final.yaml | 6867 ++++++++++++++++ ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 3112 +++++++ 30 files changed, 21449 insertions(+), 2 deletions(-) create mode 100644 api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml create mode 100644 api/l2-config/option1/README create mode 100644 api/l2-config/option1/example-jsons/cancel.yaml create mode 100644 api/l2-config/option1/example-jsons/confirm.yaml create mode 100644 api/l2-config/option1/example-jsons/init.yaml create mode 100644 api/l2-config/option1/example-jsons/on_cancel.yaml create mode 100644 api/l2-config/option1/example-jsons/on_confirm.yaml create mode 100644 api/l2-config/option1/example-jsons/on_init.yaml create mode 100644 api/l2-config/option1/example-jsons/on_rating.yaml create mode 100644 api/l2-config/option1/example-jsons/on_search.yaml create mode 100644 api/l2-config/option1/example-jsons/on_select.yaml create mode 100644 api/l2-config/option1/example-jsons/on_status.yaml create mode 100644 api/l2-config/option1/example-jsons/on_support.yaml create mode 100644 api/l2-config/option1/example-jsons/on_track.yaml create mode 100644 api/l2-config/option1/example-jsons/on_update.yaml create mode 100644 api/l2-config/option1/example-jsons/rating.yaml create mode 100644 api/l2-config/option1/example-jsons/search.yaml create mode 100644 api/l2-config/option1/example-jsons/select.yaml create mode 100644 api/l2-config/option1/example-jsons/status.yaml create mode 100644 api/l2-config/option1/example-jsons/support.yaml create mode 100644 api/l2-config/option1/example-jsons/track.yaml create mode 100644 api/l2-config/option1/example-jsons/update.yaml create mode 100644 api/l2-config/option1/example-rules/search/rule1.yaml create mode 100644 api/l2-config/option1/example-rules/search/rule2.yaml create mode 100644 api/l2-config/option1/example-rules/search/search.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml create mode 100644 api/l2-config/option1/final.yaml create mode 100644 api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml diff --git a/api/l2-config/mobility_ondemandride_1.1.0.yaml b/api/l2-config/mobility_ondemandride_1.1.0.yaml index 2042dff..fb6dbe7 100644 --- a/api/l2-config/mobility_ondemandride_1.1.0.yaml +++ b/api/l2-config/mobility_ondemandride_1.1.0.yaml @@ -2598,6 +2598,7 @@ paths: - code required: - state + - agent required: - quote - billing @@ -5212,8 +5213,7 @@ components: type: apiKey in: header name: Authorization - description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(BLAKE-512(signing string))"' - + 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))"' schemas: Ack: 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.' diff --git a/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml new file mode 100644 index 0000000..b9de670 --- /dev/null +++ b/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml @@ -0,0 +1,7253 @@ +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: [] +paths: + /search: + post: + description: Search for services by intent + requestBody: + content: + application/json: + examples: + 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 + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - search + message: + properties: + intent: + $ref: '#/components/schemas/Intent' + type: object + required: + - context + - message + type: object + description: BAP searches for services + 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) + - Beckn Gateway (BG) + /select: + post: + description: Select items from the catalog and build your order + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - order + type: object + required: + - context + - message + type: object + 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) + /init: + post: + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing + - payments + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - bpp_id + - bpp_uri + message: + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + schema: + 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 + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - rating + required: + - bpp_id + - bpp_uri + message: + properties: + ratings: + items: + $ref: '#/components/schemas/Rating' + minItems: 1 + type: array + type: object + required: + - context + - message + type: object + 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) + /support: + post: + description: Contact support + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - support + required: + - bpp_id + - bpp_uri + message: + properties: + support: + $ref: '#/components/schemas/Support' + required: + - ref_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - track + required: + - bpp_id + - bpp_uri + message: + additionalProperties: false + properties: + callback_url: + format: uri + type: string + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - cancel + required: + - bpp_id + - bpp_uri + message: + properties: + cancellation_reason_id: + $ref: '#/components/schemas/Option/properties/id' + descriptor: + $ref: '#/components/schemas/Descriptor' + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object + required: + - context + type: object + 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: + - 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + - billing + - payments + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + - agent + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_update + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_rating + required: + - bpp_id + - bpp_uri + 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 + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_support + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + support: + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_track + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + tracking: + $ref: '#/components/schemas/Tracking' + required: + - tracking + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_cancel + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + - cancellation + required: + - order + type: object + required: + - context + type: object + 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 + BAPOrder: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - $ref: '#/components/schemas/Fulfillment' + required: + - id + minItems: 1 + type: array + items: + items: + allOf: + - $ref: '#/components/schemas/Item' + required: + - id + minItems: 1 + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + required: + - id + description: Describes the order details from the perspective of the BAP. Contains + the order details sent from a BAP to BPP. + required: + - provider + - items + - fulfillments + BPPOrder: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + required: + - id + - type + type: array + items: + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + items: + $ref: '#/components/schemas/Image' + minItems: 1 + type: array + required: + - name + - images + - short_desc + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - id + - descriptor + - price + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + items: + $ref: '#/components/schemas/Image' + minItems: 1 + type: array + required: + - name + - images + - short_desc + required: + - id + - descriptor + description: Describes the order details from the perspective of the BPP. Contains + the order details sent from a BPP to BAP. + required: + - provider + - items + - fulfillments + 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: + enum: + - CONSUMER + - PROVIDER + 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 + required: + - time + - cancelled_by + 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: + - cancel_by + - 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.
  • This is typically + used in the discovery stage when the BPP sends the details of the products + and services it offers as response to a search intent from the BAP.
+ properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when + a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + offers: + description: Offers at the BPP-level. This is common across all providers + onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This + can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + items: + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - descriptor + - price + - category_ids + - fulfillment_ids + type: array + required: + - id + - categories + - descriptor + - items + minItems: 1 + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + required: + - providers + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a + specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: Every API call in beckn protocol has a context. It provides a high-level + overview to the receiver about the nature of the intended transaction. Typically, + it is the BAP that sets the transaction context based on the consumer's location + and action on their UI. But sometimes, during unsolicited callbacks, the BPP + also sets the transaction context but it is usually the same as the context + of a previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields.
  1. Demographic + information about the transaction using fields like `domain`, `country`, and + `region`.
  2. Addressing details like the sending and receiving platform's + ID and API URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like the method + being called at the receiver's endpoint, the transaction_id that represents + an end-to-end user session at the BAP, a message ID to pair requests with + callbacks, a timestamp to capture sending times, a ttl to specifiy the validity + of the request, and a key to encrypt information if necessary.
This + object must be passed in every interaction between a BAP and a BPP. In HTTP/S + implementations, it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent during + all interactions, + properties: + action: + description: The Beckn protocol method being called by the sender and executed + at the receiver. + type: string + bap_id: + allOf: + - description: A globally unique identifier of the platform, Typically it + is the fully qualified domain name (FQDN) of the platform. + type: string + - not: + format: uri + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily + contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: This is a unique value which persists during a request / callback + cycle. Since beckn protocol APIs are asynchronous, BAPs need a common + value to match an incoming callback from a BPP to an earlier call. This + value can also be used to ignore duplicate messages coming from the BPP. + It is recommended to generate a fresh message_id for every new interaction. + When sending unsolicited callbacks, BPPs must generate a new message_id. + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: This is a unique value which persists across all API calls + from `search` through `confirm`. This is done to indicate an active user + session across multiple requests. The BPPs can use this value to push + personalized recommendations, and dynamic offerings related to an ongoing + transaction despite being unaware of the user active on the BAP. + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this + message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + required: + - action + - domain + - version + - bap_id + - bap_uri + - transaction_id + - message_id + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: '[+-]?([0-9]*[.])?[0-9]+' + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: Described the industry sector or sub-sector. The network policy + should contain codes for all the industry sectors supported by the network. + Domains can be created in varying levels of granularity. The granularity of + a domain can be decided by the participants of the network. Too broad domains + will result in irrelevant search broadcast calls to BPPs that don't have services + supporting the domain. Too narrow domains will result in a large number of + registry entries for each BPP. It is recommended that network facilitators + actively collaborate with various working groups and network participants + to carefully choose domain codes keeping in mind relevance, performance, and + opportunity cost. It is recommended that networks choose broad domains like + mobility, logistics, healthcare etc, and progressively granularize them as + and when the number of network participants for each domain grows large. + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: Standard code representing the domain. The standard is usually + published as part of the network policy. Furthermore, the network facilitator + should also provide a mechanism to provide the supported domains of a + network. + enum: + - mobility:ondemandride + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: Describes an error object that is returned by a BAP, BPP or BG + as a response or callback to an action by another network participant. This + object is sent when any request received by a network participant is unacceptable. + This object can be sent either during Ack or with the callback. + properties: + code: + description: Standard error code. For full list of error codes, refer to + docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo" + type: string + message: + description: Human readable message describing the error. Used mainly for + logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during + json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received + by querying the url. MIME types are defined and standardized in IETF's + RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: The URL from where the form can be fetched. The content fetched + from the url must be processed as per the mime_type specified in this + object. Once fetched, the rendering platform can choosed to render the + form as-is as an embeddable element; or process it further to blend with + the theme of the application. In case the interface is non-visual, the + the render can process the form data and reproduce it as per the standard + specified in the form. + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the + order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on + a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value + whenever the state of the order fulfillment changes and fire an unsolicited + `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment + of an order. + items: + $ref: '#/components/schemas/Stop' + minItems: 2 + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: A code that describes the mode of fulfillment. This is typically + set when there are multiple ways an order can be fulfilled. For example, + a retail order can be fulfilled either via store pickup or a home delivery. + Similarly, a medical consultation can be provided either in-person or + via tele-consultation. The network policy must publish standard fulfillment + type codes for the different modes of fulfillment. + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + required: + - stops + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + enum: + - DRIVER_EN_ROUTE_TO_PICKUP + - DRIVER_AT_PICKUP + - RIDE_STARTED + - RIDE_ENDED + - RIDE_CANCELLED + - PAYMENT_COLLECTED + type: string + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: ^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$ + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default + dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: The intent to buy or avail a product or a service. The BAP can + declare the intent of the consumer containing
  • What they want (A product, + service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where + they want it and where they want it from
  • When they want it (start + and end time of fulfillment
  • How they want to pay for it

This + has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This + is typically used by the BAP to send the purpose of the user's search to the + BPP. This will be used by the BPP to find products or services it offers that + may match the user's intent.
For example, in Mobility, the mobility consumer + declares a mobility intent. In this case, the mobility consumer declares information + that describes various aspects of their journey like,
  • Where would they + like to begin their journey (intent.fulfillment.start.location)
  • Where + would they like to end their journey (intent.fulfillment.end.location)
  • When + would they like to begin their journey (intent.fulfillment.start.time)
  • When + would they like to end their journey (intent.fulfillment.end.time)
  • Who + is the transport service provider they would like to avail services from (intent.provider)
  • Who + is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What + kind of fare product would they like to purchase (intent.item)
  • What + add-on services would they like to avail
  • What offers would they like + to apply on their booking (intent.offer)
  • What category of services + would they like to avail (intent.category)
  • What additional luggage + are they carrying
  • How would they like to pay for their journey (intent.payment)

For + example, in health domain, a consumer declares the intent for a lab booking + the describes various aspects of their booking like,
  • Where would they + like to get their scan/test done (intent.fulfillment.start.location)
  • When + would they like to get their scan/test done (intent.fulfillment.start.time)
  • When + would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who + is the service provider they would like to avail services from (intent.provider)
  • Who + is getting the test/scan (intent.fulfillment.customer)
  • What kind of + test/scan would they like to purchase (intent.item)
  • What category + of services would they like to avail (intent.category)
  • How would they + like to pay for their journey (intent.payment)
+ properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: A raw description of the search intent. Free text search strings, + raw audio, etc can be sent in this object. + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the + order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + required: + - fulfillment + type: object + Item: + additionalProperties: false + description: Describes a product or a service offered to the end consumer by + the provider. In the mobility sector, it can represent a fare product like + one way journey. In the logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a product like a grocery item. + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: ID of the item, this item is a variant of + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple + of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The price of this item, if it has intrinsic value + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful + cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched + item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when + the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail + this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of + the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of + the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of + the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of + the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of + the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city this location is, or is located within + country: + allOf: + - $ref: '#/components/schemas/Country' + description: The country this location is, or is located within + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: The state this location is, or is located within + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally + recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state this location is, or is located within + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: indicates the nature and format of the document, file, or assortment + of bytes. MIME types are defined and standardized in IETF's RFC 6838 + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote + a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details + of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP + layer. The BPP can either generate order id within its system or forward + the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network + policy + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: This is used to indicate the type of order being created to + BPPs. Sometimes orders can be linked to previous orders, like a replacement + order in a retail domain. A follow-up consultation in healthcare domain. + A single order part of a subscription order. The list of order types can + be standardized at the network level. + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this + order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: Describes the terms of settlement between the BAP and the BPP for + a single transaction. When instantiated, this object contains
  1. the + amount that has to be settled,
  2. The payment destination destination + details
  3. When the settlement should happen, and
  4. A transaction + reference ID
. During a transaction, the BPP reserves the right to + decide the terms of payment. However, the BAP can send its terms to the BPP + first. If the BPP does not agree to those terms, it must overwrite the terms + and return them to the BAP. If overridden, the BAP must either agree to the + terms sent by the BPP in order to preserve the provider's autonomy, or abort + the transaction. In case of such disagreements, the BAP and the BPP can perform + offline negotiations on the payment terms. Once an agreement is reached, the + BAP and BPP can resume transactions. + properties: + collected_by: + description: This field indicates who is the collector of payment. The BAP + can set this value to 'bap' if it wants to collect the payment first and settle + it to the BPP. If the BPP agrees to those terms, the BPP should not send + the payment url. Alternatively, the BPP can set this field with the value + 'bpp' if it wants the payment to be made directly. + enum: + - DRIVER + - DRIVER_APP + - RIDER_APP + type: string + id: + description: ID of the payment term that can be referred at an item or an + order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment + activity + type: string + virtual_payment_address: + type: string + required: + - amount + - currency + type: object + status: + enum: + - PAID + - NOT-PAID + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + type: string + url: + description: A payment url to be called by the BAP. If empty, then the payment + is to be done offline. The details of payment should be present in the + params object. If tl_method = http/get, then the payment details will + be sent as url params. Two url param values, ```$transaction_id``` and + ```$amount``` are mandatory. + format: uri + type: string + required: + - collected_by + - type + - status + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: Gender of something, typically a Person, but possibly also + fictional characters, animals, etc. While Male and Female may be used, + text strings are also acceptable for people who do not identify as a binary + gender.Allowed values for this field can be published in the network policy + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + minItems: 1 + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: The time-to-live in seconds, for this object. This can be overriden + at deeper levels. A value of -1 indicates that this object is not cacheable. + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: Describes a quote. It is the estimated price of products or services + from the BPP.
This has properties like price, breakup, ttl + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + title: + enum: + - BASE FARE + - TAX + - DISCOUNT + - WAITING CHARGE + type: string + required: + - title + - price + type: object + minItems: 1 + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + required: + - currency + - value + ttl: + $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + enum: + - RIDE + - DRIVER + - SERVICE + type: string + value: + description: Rating value given to the object. This can be a single value + or can also contain an inequality operator like gt, gte, lt, lte. This + can also contain an inequality expression containing logical operators + like && and ||. + type: string + required: + - rating_category + - id + - value + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should + contain a published list of supported regions by the network. + properties: + boundary: + description: A string representing the boundary of the region. One-dimensional + regions are represented by polylines. Two-dimensional regions are represented + by polygons, and three-dimensional regions can represented by polyhedra. + type: string + code: + description: A standard code representing the region. This should be interpreted + in the same way by all network participants. + type: string + dimensions: + description: The number of dimensions that are used to describe any point + inside that region. The most common dimensionality of a region is 2, that + represents an area on a map. There are regions on the map that can be + approximated to one-dimensional regions like roads, railway lines, or + shipping lines. 3 dimensional regions are rarer, but are gaining popularity + as flying drones are being adopted for various fulfillment services. + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized + map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region + exists. + type: string + type: + description: The type of region. This is used to specify the granularity + of the region represented by this object. Various examples of two-dimensional + region types are city, country, state, district, and so on. The network + policy should contain a list of all possible region types supported by + the network. + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to replace the item before a certain date-time, failing which they will + not be eligible for replacement + required: + - replace_within + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + enum: + - CONSUMER + - PROVIDER + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned + to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to return the item to the origin before a certain date-time, failing which + they will not be eligible for refund. + required: + - return_time + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an + order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined + by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + email: + format: email + type: string + phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + ref_id: + type: string + url: + format: uri + type: string + required: + - ref_id + type: object + Tag: + additionalProperties: false + description: Describes a tag. This is used to contain extended metadata. This + object can be added as a property to any schema to describe extended attributes. + For BAPs, tags can be sent during search to optimize and filter search results. + BPPs can use tags to index their catalog to allow better search functionality. + Tags are sent by the BPP as part of the catalog response in the `on_search` + callback. Tags are also meant for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value pairs. This is particularly useful + when rendering tabular information about a product or service. + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the Tag, can be used to store detailed information. + display: + description: This value indicates if the tag is intended for display purposes. + If set to `true`, then this tag must be displayed. If it is set to `false`, + it should not be displayed. This value can override the group display + value. + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is + by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: A collection of tag objects with group level attributes. For detailed + documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the TagGroup, can be used to store detailed + information. + display: + default: true + description: Indicates the display properties of the tag group. If display + is set to false, then the group will not be displayed. If it is set to + true, it should be displayed. However, group-level display properties + can be overriden by individual tag-level display property. As this schema + is purely for catalog display purposes, it is not recommended to send + this value during search. + type: boolean + list: + description: An array of Tag objects listed under this group. This property + can be set by BAPs during search to narrow the `search` and achieve more + relevant results. When received during `on_search`, BAPs must render this + list under the heading described by the `name` property of this schema. + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in + time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track + the fulfillment of an order in real-time. which is useful for knowing the + location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: In case there is no real-time tracking endpoint available, + this field will contain the latest location of the entity being tracked. + The BPP will update this value everytime the BAP calls the track API. + status: + description: This value indicates if the tracking is currently active or + not. If this value is `active`, then the BAP can begin tracking the order. + If this value is `inactive`, the tracking URL is considered to be expired + and the BAP should stop tracking the order. + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: A URL to the tracking endpoint. This can be a link to a tracking + webpage, a webhook URL created by the BAP where BPP can push the tracking + data, or a GET url creaed by the BPP which the BAP can poll to get the + tracking data. It can also be a websocket URL where the BPP can push real-time + tracking data. + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: Describes a vehicle is a device that is designed or used to transport + people or cargo over land, water, air, or through space.
This has properties + like category, capacity, make, model, size,variant,color,energy_type,registration + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: Contains any additional or extended inputs required to confirm + an order. This is typically a Form Input. Sometimes, selection of catalog + elements is not enough for the BPP to confirm an order. For example, to confirm + a flight ticket, the airline requires details of the passengers along with + information on baggage, identity, in addition to the class of ticket. Similarly, + a logistics company may require details on the nature of shipment in order + to confirm the shipping. A recruiting firm may require additional details + on the applicant in order to confirm a job application. For all such purposes, + the BPP can choose to send this object attached to any object in the catalog + that is required to be sent while placing the order. This object can typically + be sent at an item level or at the order level. The item level XInput will + override the Order level XInput as it indicates a special requirement of information + for that particular item. Hence the BAP must render a separate form for the + Item and another form at the Order level before confirmation. + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by + the BPP to confirm the order. + type: boolean + type: object + + diff --git a/api/l2-config/option1/README b/api/l2-config/option1/README new file mode 100644 index 0000000..b254e2f --- /dev/null +++ b/api/l2-config/option1/README @@ -0,0 +1,2 @@ +how to compile final.yaml from other components: +swagger-cli bundle mobility_ondemandride_1.1.0_openapi_3.1.yaml --outfile final.yaml --type yaml \ No newline at end of file diff --git a/api/l2-config/option1/example-jsons/cancel.yaml b/api/l2-config/option1/example-jsons/cancel.yaml new file mode 100644 index 0000000..58551fb --- /dev/null +++ b/api/l2-config/option1/example-jsons/cancel.yaml @@ -0,0 +1,64 @@ +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' diff --git a/api/l2-config/option1/example-jsons/confirm.yaml b/api/l2-config/option1/example-jsons/confirm.yaml new file mode 100644 index 0000000..1a498e8 --- /dev/null +++ b/api/l2-config/option1/example-jsons/confirm.yaml @@ -0,0 +1,105 @@ +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' diff --git a/api/l2-config/option1/example-jsons/init.yaml b/api/l2-config/option1/example-jsons/init.yaml new file mode 100644 index 0000000..26814b7 --- /dev/null +++ b/api/l2-config/option1/example-jsons/init.yaml @@ -0,0 +1,95 @@ +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' diff --git a/api/l2-config/option1/example-jsons/on_cancel.yaml b/api/l2-config/option1/example-jsons/on_cancel.yaml new file mode 100644 index 0000000..234b194 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_cancel.yaml @@ -0,0 +1,432 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/option1/example-jsons/on_confirm.yaml b/api/l2-config/option1/example-jsons/on_confirm.yaml new file mode 100644 index 0000000..5925175 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_confirm.yaml @@ -0,0 +1,400 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/option1/example-jsons/on_init.yaml b/api/l2-config/option1/example-jsons/on_init.yaml new file mode 100644 index 0000000..357b842 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_init.yaml @@ -0,0 +1,377 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/option1/example-jsons/on_rating.yaml b/api/l2-config/option1/example-jsons/on_rating.yaml new file mode 100644 index 0000000..dc8f519 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_rating.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/option1/example-jsons/on_search.yaml b/api/l2-config/option1/example-jsons/on_search.yaml new file mode 100644 index 0000000..1997f78 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_search.yaml @@ -0,0 +1,648 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/option1/example-jsons/on_select.yaml b/api/l2-config/option1/example-jsons/on_select.yaml new file mode 100644 index 0000000..eb430fd --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_select.yaml @@ -0,0 +1,226 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/option1/example-jsons/on_status.yaml b/api/l2-config/option1/example-jsons/on_status.yaml new file mode 100644 index 0000000..61af446 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_status.yaml @@ -0,0 +1,981 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/option1/example-jsons/on_support.yaml b/api/l2-config/option1/example-jsons/on_support.yaml new file mode 100644 index 0000000..b233792 --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_support.yaml @@ -0,0 +1,24 @@ +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 diff --git a/api/l2-config/option1/example-jsons/on_track.yaml b/api/l2-config/option1/example-jsons/on_track.yaml new file mode 100644 index 0000000..ea142ee --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_track.yaml @@ -0,0 +1,21 @@ +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 diff --git a/api/l2-config/option1/example-jsons/on_update.yaml b/api/l2-config/option1/example-jsons/on_update.yaml new file mode 100644 index 0000000..3c29c5d --- /dev/null +++ b/api/l2-config/option1/example-jsons/on_update.yaml @@ -0,0 +1,338 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/option1/example-jsons/rating.yaml b/api/l2-config/option1/example-jsons/rating.yaml new file mode 100644 index 0000000..e73e2a1 --- /dev/null +++ b/api/l2-config/option1/example-jsons/rating.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/option1/example-jsons/search.yaml b/api/l2-config/option1/example-jsons/search.yaml new file mode 100644 index 0000000..a4bb471 --- /dev/null +++ b/api/l2-config/option1/example-jsons/search.yaml @@ -0,0 +1,57 @@ +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 diff --git a/api/l2-config/option1/example-jsons/select.yaml b/api/l2-config/option1/example-jsons/select.yaml new file mode 100644 index 0000000..9629dd0 --- /dev/null +++ b/api/l2-config/option1/example-jsons/select.yaml @@ -0,0 +1,169 @@ +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' diff --git a/api/l2-config/option1/example-jsons/status.yaml b/api/l2-config/option1/example-jsons/status.yaml new file mode 100644 index 0000000..6c96dc1 --- /dev/null +++ b/api/l2-config/option1/example-jsons/status.yaml @@ -0,0 +1,40 @@ +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' diff --git a/api/l2-config/option1/example-jsons/support.yaml b/api/l2-config/option1/example-jsons/support.yaml new file mode 100644 index 0000000..76e54e1 --- /dev/null +++ b/api/l2-config/option1/example-jsons/support.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/option1/example-jsons/track.yaml b/api/l2-config/option1/example-jsons/track.yaml new file mode 100644 index 0000000..7ded9f7 --- /dev/null +++ b/api/l2-config/option1/example-jsons/track.yaml @@ -0,0 +1,20 @@ +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 diff --git a/api/l2-config/option1/example-jsons/update.yaml b/api/l2-config/option1/example-jsons/update.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/option1/example-rules/search/rule1.yaml b/api/l2-config/option1/example-rules/search/rule1.yaml new file mode 100644 index 0000000..1df3e40 --- /dev/null +++ b/api/l2-config/option1/example-rules/search/rule1.yaml @@ -0,0 +1,23 @@ +properties: + message: + properties: + intent: + properties: + fulfillment: + properties: + type: + enum: ["DELIVERY", "PICKUP"] + stops: + type: array + items: + properties: + location: + properties: + gps: + type: string + required: + - gps + required: + - location + required: + - fulfillment diff --git a/api/l2-config/option1/example-rules/search/rule2.yaml b/api/l2-config/option1/example-rules/search/rule2.yaml new file mode 100644 index 0000000..1df3e40 --- /dev/null +++ b/api/l2-config/option1/example-rules/search/rule2.yaml @@ -0,0 +1,23 @@ +properties: + message: + properties: + intent: + properties: + fulfillment: + properties: + type: + enum: ["DELIVERY", "PICKUP"] + stops: + type: array + items: + properties: + location: + properties: + gps: + type: string + required: + - gps + required: + - location + required: + - fulfillment diff --git a/api/l2-config/option1/example-rules/search/search.yaml b/api/l2-config/option1/example-rules/search/search.yaml new file mode 100644 index 0000000..489bcef --- /dev/null +++ b/api/l2-config/option1/example-rules/search/search.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./rule1.yaml" + - $ref: "./rule2.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml b/api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml new file mode 100644 index 0000000..7df1b05 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml @@ -0,0 +1,23 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + required: + - id + items: + type: array + minItems: 1 + items: + type: object + required: + - id + provider: + type: object + required: + - id diff --git a/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml b/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml new file mode 100644 index 0000000..3b7c550 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml @@ -0,0 +1,75 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + required: + - id + - type + items: + type: array + minItems: 1 + items: + type: object + properties: + descriptor: + type: object + properties: + images: + type: array + minItems: 1 + items: + type: object + name: + type: string + short_desc: + type: string + required: + - name + - images + - short_desc + price: + type: object + properties: + currency: + type: string + value: + type: string + required: + - currency + - value + required: + - id + - descriptor + - price + provider: + type: object + properties: + descriptor: + type: object + properties: + images: + type: array + minItems: 1 + items: + type: object + name: + type: string + short_desc: + type: string + required: + - name + - images + - short_desc + required: + - id + - descriptor + required: + - provider + - items + - fulfillments diff --git a/api/l2-config/option1/final.yaml b/api/l2-config/option1/final.yaml new file mode 100644 index 0000000..7738c1c --- /dev/null +++ b/api/l2-config/option1/final.yaml @@ -0,0 +1,6867 @@ +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 + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + requestBody: + content: + application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - search + message: + properties: + intent: + $ref: '#/components/schemas/Intent' + type: object + required: + - context + - message + - allOf: + - properties: + message: + properties: + intent: + properties: + fulfillment: + properties: + type: + enum: + - DELIVERY + - PICKUP + stops: + type: array + items: + properties: + location: + properties: + gps: + type: string + required: + - gps + required: + - location + required: + - fulfillment + - properties: + message: + properties: + intent: + properties: + fulfillment: + properties: + type: + enum: + - DELIVERY + - PICKUP + stops: + type: array + items: + properties: + location: + properties: + gps: + type: string + required: + - gps + required: + - location + 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 + tags: + - Beckn Provider Platform (BPP) + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object + required: + - context + - message + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - billing + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - billing + - payments + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - bpp_id + - bpp_uri + message: + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + schema: + 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 + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - rating + required: + - bpp_id + - bpp_uri + message: + properties: + ratings: + items: + $ref: '#/components/schemas/Rating' + minItems: 1 + type: array + type: object + required: + - context + - message + type: object + 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) + /support: + post: + description: Contact support + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - support + required: + - bpp_id + - bpp_uri + message: + properties: + support: + $ref: '#/components/schemas/Support' + required: + - ref_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - track + required: + - bpp_id + - bpp_uri + message: + additionalProperties: false + properties: + callback_url: + format: uri + type: string + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - cancel + required: + - bpp_id + - bpp_uri + message: + properties: + cancellation_reason_id: + $ref: '#/components/schemas/Option/properties/id' + descriptor: + $ref: '#/components/schemas/Descriptor' + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object + required: + - context + type: object + 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: + - 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - not: + required: + - id + required: + - quote + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - not: + required: + - id + required: + - quote + - billing + - payments + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + - agent + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_update + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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 + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_rating + required: + - bpp_id + - bpp_uri + 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 + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_support + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + support: + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_track + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + tracking: + $ref: '#/components/schemas/Tracking' + required: + - tracking + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + 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' + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_cancel + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + - cancellation + required: + - order + type: object + required: + - context + type: object + 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: + enum: + - CONSUMER + - PROVIDER + 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 + required: + - time + - cancelled_by + 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: + - cancel_by + - 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.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
' + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + items: + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - descriptor + - price + - category_ids + - fulfillment_ids + type: array + required: + - id + - categories + - descriptor + - items + minItems: 1 + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + required: + - providers + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' + properties: + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + bap_id: + allOf: + - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' + type: string + - not: + format: uri + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: 'This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id.' + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: 'This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP.' + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + required: + - action + - domain + - version + - bap_id + - bap_uri + - transaction_id + - message_id + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: '[+-]?([0-9]*[.])?[0-9]+' + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: 'Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network.' + enum: + - 'mobility:ondemandride' + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' + properties: + code: + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + type: string + message: + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment of an order. + items: + $ref: '#/components/schemas/Stop' + minItems: 2 + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: 'A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment.' + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + required: + - stops + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + enum: + - DRIVER_EN_ROUTE_TO_PICKUP + - DRIVER_AT_PICKUP + - RIDE_STARTED + - RIDE_ENDED + - RIDE_CANCELLED + - PAYMENT_COLLECTED + type: string + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
' + properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + required: + - fulfillment + type: object + Item: + additionalProperties: false + description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: 'ID of the item, this item is a variant of' + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: 'The price of this item, if it has intrinsic value' + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: 'The city this location is, or is located within' + country: + allOf: + - $ref: '#/components/schemas/Country' + description: 'The country this location is, or is located within' + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: 'The state this location is, or is located within' + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: 'The state this location is, or is located within' + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network policy + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: 'This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level.' + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' + properties: + collected_by: + description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' + enum: + - DRIVER + - DRIVER_APP + - RIDER_APP + type: string + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment activity + type: string + virtual_payment_address: + type: string + required: + - amount + - currency + type: object + status: + enum: + - PAID + - NOT-PAID + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + type: string + url: + description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' + format: uri + type: string + required: + - collected_by + - type + - status + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: 'Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy' + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + minItems: 1 + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: 'The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable.' + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - value + title: + enum: + - BASE FARE + - TAX + - DISCOUNT + - WAITING CHARGE + type: string + required: + - title + - price + type: object + minItems: 1 + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + required: + - currency + - value + ttl: + $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + enum: + - RIDE + - DRIVER + - SERVICE + type: string + value: + description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' + type: string + required: + - rating_category + - id + - value + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + properties: + boundary: + description: 'A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra.' + type: string + code: + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + type: string + dimensions: + description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region exists. + type: string + type: + description: 'The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network.' + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement' + required: + - replace_within + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + enum: + - CONSUMER + - PROVIDER + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund.' + required: + - return_time + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + email: + format: email + type: string + phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + ref_id: + type: string + url: + format: uri + type: string + required: + - ref_id + type: object + Tag: + additionalProperties: false + description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the Tag, can be used to store detailed information.' + display: + description: 'This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value.' + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the TagGroup, can be used to store detailed information.' + display: + default: true + description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' + type: boolean + list: + description: 'An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema.' + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: 'In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API.' + status: + description: 'This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order.' + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: 'A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data.' + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean + type: object diff --git a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml new file mode 100644 index 0000000..c3d498a --- /dev/null +++ b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml @@ -0,0 +1,3112 @@ +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 + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + requestBody: + content: + application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - search + message: + properties: + intent: + $ref: '#/components/schemas/Intent' + type: object + required: + - context + - message + - $ref: "./example-rules/search/search.yaml" + examples: + $ref: "./example-jsons/search.yaml" + 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 + tags: + - Beckn Provider Platform (BPP) + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object + required: + - context + - message + examples: + $ref: "./example-jsons/select.yaml" + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/init.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - billing + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/confirm.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - bpp_id + - bpp_uri + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - billing + - payments + required: + - order + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/status.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - bpp_id + - bpp_uri + message: + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + schema: + 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 + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/rating.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - rating + required: + - bpp_id + - bpp_uri + message: + properties: + ratings: + items: + $ref: '#/components/schemas/Rating' + minItems: 1 + type: array + type: object + required: + - context + - message + type: object + 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) + /support: + post: + description: Contact support + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/support.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - support + required: + - bpp_id + - bpp_uri + message: + properties: + support: + $ref: '#/components/schemas/Support' + required: + - ref_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/track.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - track + required: + - bpp_id + - bpp_uri + message: + additionalProperties: false + properties: + callback_url: + format: uri + type: string + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/cancel.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - cancel + required: + - bpp_id + - bpp_uri + message: + properties: + cancellation_reason_id: + $ref: '#/components/schemas/Option/properties/id' + descriptor: + $ref: '#/components/schemas/Descriptor' + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + type: object + required: + - context + - message + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_search.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object + required: + - context + type: object + 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: + - 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_select.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - not: + required: + - id + required: + - quote + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_init.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - not: + required: + - id + required: + - quote + - billing + - payments + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_confirm.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + - agent + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_status.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_update.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_update + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + required: + - order + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_rating.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_rating + required: + - bpp_id + - bpp_uri + 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 + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_support.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_support + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + support: + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_track.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_track + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + tracking: + $ref: '#/components/schemas/Tracking' + required: + - tracking + type: object + required: + - context + type: object + 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 + requestBody: + content: + application/json: + examples: + $ref: "./example-jsons/on_cancel.yaml" + schema: + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_cancel + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - properties: + fulfillments: + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + type: array + required: + - quote + - billing + - payments + - id + - cancellation + required: + - order + type: object + required: + - context + type: object + 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: + enum: + - CONSUMER + - PROVIDER + 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 + required: + - time + - cancelled_by + 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: + - cancel_by + - 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.
  • This is typically + used in the discovery stage when the BPP sends the details of the products + and services it offers as response to a search intent from the BAP.
+ properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when + a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + offers: + description: Offers at the BPP-level. This is common across all providers + onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This + can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + items: + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + required: + - descriptor + - price + - category_ids + - fulfillment_ids + type: array + required: + - id + - categories + - descriptor + - items + minItems: 1 + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + required: + - providers + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a + specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: Every API call in beckn protocol has a context. It provides a high-level + overview to the receiver about the nature of the intended transaction. Typically, + it is the BAP that sets the transaction context based on the consumer's location + and action on their UI. But sometimes, during unsolicited callbacks, the BPP + also sets the transaction context but it is usually the same as the context + of a previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields.
  1. Demographic + information about the transaction using fields like `domain`, `country`, and + `region`.
  2. Addressing details like the sending and receiving platform's + ID and API URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like the method + being called at the receiver's endpoint, the transaction_id that represents + an end-to-end user session at the BAP, a message ID to pair requests with + callbacks, a timestamp to capture sending times, a ttl to specifiy the validity + of the request, and a key to encrypt information if necessary.
This + object must be passed in every interaction between a BAP and a BPP. In HTTP/S + implementations, it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent during + all interactions, + properties: + action: + description: The Beckn protocol method being called by the sender and executed + at the receiver. + type: string + bap_id: + allOf: + - description: A globally unique identifier of the platform, Typically it + is the fully qualified domain name (FQDN) of the platform. + type: string + - not: + format: uri + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily + contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: This is a unique value which persists during a request / callback + cycle. Since beckn protocol APIs are asynchronous, BAPs need a common + value to match an incoming callback from a BPP to an earlier call. This + value can also be used to ignore duplicate messages coming from the BPP. + It is recommended to generate a fresh message_id for every new interaction. + When sending unsolicited callbacks, BPPs must generate a new message_id. + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: This is a unique value which persists across all API calls + from `search` through `confirm`. This is done to indicate an active user + session across multiple requests. The BPPs can use this value to push + personalized recommendations, and dynamic offerings related to an ongoing + transaction despite being unaware of the user active on the BAP. + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this + message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + required: + - action + - domain + - version + - bap_id + - bap_uri + - transaction_id + - message_id + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: '[+-]?([0-9]*[.])?[0-9]+' + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: Described the industry sector or sub-sector. The network policy + should contain codes for all the industry sectors supported by the network. + Domains can be created in varying levels of granularity. The granularity of + a domain can be decided by the participants of the network. Too broad domains + will result in irrelevant search broadcast calls to BPPs that don't have services + supporting the domain. Too narrow domains will result in a large number of + registry entries for each BPP. It is recommended that network facilitators + actively collaborate with various working groups and network participants + to carefully choose domain codes keeping in mind relevance, performance, and + opportunity cost. It is recommended that networks choose broad domains like + mobility, logistics, healthcare etc, and progressively granularize them as + and when the number of network participants for each domain grows large. + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: Standard code representing the domain. The standard is usually + published as part of the network policy. Furthermore, the network facilitator + should also provide a mechanism to provide the supported domains of a + network. + enum: + - mobility:ondemandride + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: Describes an error object that is returned by a BAP, BPP or BG + as a response or callback to an action by another network participant. This + object is sent when any request received by a network participant is unacceptable. + This object can be sent either during Ack or with the callback. + properties: + code: + description: Standard error code. For full list of error codes, refer to + docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo" + type: string + message: + description: Human readable message describing the error. Used mainly for + logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during + json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received + by querying the url. MIME types are defined and standardized in IETF's + RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: The URL from where the form can be fetched. The content fetched + from the url must be processed as per the mime_type specified in this + object. Once fetched, the rendering platform can choosed to render the + form as-is as an embeddable element; or process it further to blend with + the theme of the application. In case the interface is non-visual, the + the render can process the form data and reproduce it as per the standard + specified in the form. + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the + order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on + a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value + whenever the state of the order fulfillment changes and fire an unsolicited + `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment + of an order. + items: + $ref: '#/components/schemas/Stop' + minItems: 2 + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: A code that describes the mode of fulfillment. This is typically + set when there are multiple ways an order can be fulfilled. For example, + a retail order can be fulfilled either via store pickup or a home delivery. + Similarly, a medical consultation can be provided either in-person or + via tele-consultation. The network policy must publish standard fulfillment + type codes for the different modes of fulfillment. + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + required: + - stops + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + enum: + - DRIVER_EN_ROUTE_TO_PICKUP + - DRIVER_AT_PICKUP + - RIDE_STARTED + - RIDE_ENDED + - RIDE_CANCELLED + - PAYMENT_COLLECTED + type: string + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: ^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$ + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default + dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: The intent to buy or avail a product or a service. The BAP can + declare the intent of the consumer containing
  • What they want (A product, + service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where + they want it and where they want it from
  • When they want it (start + and end time of fulfillment
  • How they want to pay for it

This + has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This + is typically used by the BAP to send the purpose of the user's search to the + BPP. This will be used by the BPP to find products or services it offers that + may match the user's intent.
For example, in Mobility, the mobility consumer + declares a mobility intent. In this case, the mobility consumer declares information + that describes various aspects of their journey like,
  • Where would they + like to begin their journey (intent.fulfillment.start.location)
  • Where + would they like to end their journey (intent.fulfillment.end.location)
  • When + would they like to begin their journey (intent.fulfillment.start.time)
  • When + would they like to end their journey (intent.fulfillment.end.time)
  • Who + is the transport service provider they would like to avail services from (intent.provider)
  • Who + is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What + kind of fare product would they like to purchase (intent.item)
  • What + add-on services would they like to avail
  • What offers would they like + to apply on their booking (intent.offer)
  • What category of services + would they like to avail (intent.category)
  • What additional luggage + are they carrying
  • How would they like to pay for their journey (intent.payment)

For + example, in health domain, a consumer declares the intent for a lab booking + the describes various aspects of their booking like,
  • Where would they + like to get their scan/test done (intent.fulfillment.start.location)
  • When + would they like to get their scan/test done (intent.fulfillment.start.time)
  • When + would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who + is the service provider they would like to avail services from (intent.provider)
  • Who + is getting the test/scan (intent.fulfillment.customer)
  • What kind of + test/scan would they like to purchase (intent.item)
  • What category + of services would they like to avail (intent.category)
  • How would they + like to pay for their journey (intent.payment)
+ properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: A raw description of the search intent. Free text search strings, + raw audio, etc can be sent in this object. + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the + order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + required: + - fulfillment + type: object + Item: + additionalProperties: false + description: Describes a product or a service offered to the end consumer by + the provider. In the mobility sector, it can represent a fare product like + one way journey. In the logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a product like a grocery item. + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: ID of the item, this item is a variant of + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple + of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The price of this item, if it has intrinsic value + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful + cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched + item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when + the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail + this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of + the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of + the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of + the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of + the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of + the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city this location is, or is located within + country: + allOf: + - $ref: '#/components/schemas/Country' + description: The country this location is, or is located within + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: The state this location is, or is located within + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally + recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state this location is, or is located within + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: indicates the nature and format of the document, file, or assortment + of bytes. MIME types are defined and standardized in IETF's RFC 6838 + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote + a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details + of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + minItems: 1 + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP + layer. The BPP can either generate order id within its system or forward + the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network + policy + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: This is used to indicate the type of order being created to + BPPs. Sometimes orders can be linked to previous orders, like a replacement + order in a retail domain. A follow-up consultation in healthcare domain. + A single order part of a subscription order. The list of order types can + be standardized at the network level. + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this + order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: Describes the terms of settlement between the BAP and the BPP for + a single transaction. When instantiated, this object contains
  1. the + amount that has to be settled,
  2. The payment destination destination + details
  3. When the settlement should happen, and
  4. A transaction + reference ID
. During a transaction, the BPP reserves the right to + decide the terms of payment. However, the BAP can send its terms to the BPP + first. If the BPP does not agree to those terms, it must overwrite the terms + and return them to the BAP. If overridden, the BAP must either agree to the + terms sent by the BPP in order to preserve the provider's autonomy, or abort + the transaction. In case of such disagreements, the BAP and the BPP can perform + offline negotiations on the payment terms. Once an agreement is reached, the + BAP and BPP can resume transactions. + properties: + collected_by: + description: This field indicates who is the collector of payment. The BAP + can set this value to 'bap' if it wants to collect the payment first and settle + it to the BPP. If the BPP agrees to those terms, the BPP should not send + the payment url. Alternatively, the BPP can set this field with the value + 'bpp' if it wants the payment to be made directly. + enum: + - DRIVER + - DRIVER_APP + - RIDER_APP + type: string + id: + description: ID of the payment term that can be referred at an item or an + order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment + activity + type: string + virtual_payment_address: + type: string + required: + - amount + - currency + type: object + status: + enum: + - PAID + - NOT-PAID + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + type: string + url: + description: A payment url to be called by the BAP. If empty, then the payment + is to be done offline. The details of payment should be present in the + params object. If tl_method = http/get, then the payment details will + be sent as url params. Two url param values, ```$transaction_id``` and + ```$amount``` are mandatory. + format: uri + type: string + required: + - collected_by + - type + - status + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: Gender of something, typically a Person, but possibly also + fictional characters, animals, etc. While Male and Female may be used, + text strings are also acceptable for people who do not identify as a binary + gender.Allowed values for this field can be published in the network policy + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + minItems: 1 + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + minItems: 1 + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: The time-to-live in seconds, for this object. This can be overriden + at deeper levels. A value of -1 indicates that this object is not cacheable. + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: Describes a quote. It is the estimated price of products or services + from the BPP.
This has properties like price, breakup, ttl + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - value + title: + enum: + - BASE FARE + - TAX + - DISCOUNT + - WAITING CHARGE + type: string + required: + - title + - price + type: object + minItems: 1 + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + required: + - currency + - value + ttl: + $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + enum: + - RIDE + - DRIVER + - SERVICE + type: string + value: + description: Rating value given to the object. This can be a single value + or can also contain an inequality operator like gt, gte, lt, lte. This + can also contain an inequality expression containing logical operators + like && and ||. + type: string + required: + - rating_category + - id + - value + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should + contain a published list of supported regions by the network. + properties: + boundary: + description: A string representing the boundary of the region. One-dimensional + regions are represented by polylines. Two-dimensional regions are represented + by polygons, and three-dimensional regions can represented by polyhedra. + type: string + code: + description: A standard code representing the region. This should be interpreted + in the same way by all network participants. + type: string + dimensions: + description: The number of dimensions that are used to describe any point + inside that region. The most common dimensionality of a region is 2, that + represents an area on a map. There are regions on the map that can be + approximated to one-dimensional regions like roads, railway lines, or + shipping lines. 3 dimensional regions are rarer, but are gaining popularity + as flying drones are being adopted for various fulfillment services. + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized + map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region + exists. + type: string + type: + description: The type of region. This is used to specify the granularity + of the region represented by this object. Various examples of two-dimensional + region types are city, country, state, district, and so on. The network + policy should contain a list of all possible region types supported by + the network. + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to replace the item before a certain date-time, failing which they will + not be eligible for replacement + required: + - replace_within + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + enum: + - CONSUMER + - PROVIDER + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned + to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to return the item to the origin before a certain date-time, failing which + they will not be eligible for refund. + required: + - return_time + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an + order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined + by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + email: + format: email + type: string + phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + ref_id: + type: string + url: + format: uri + type: string + required: + - ref_id + type: object + Tag: + additionalProperties: false + description: Describes a tag. This is used to contain extended metadata. This + object can be added as a property to any schema to describe extended attributes. + For BAPs, tags can be sent during search to optimize and filter search results. + BPPs can use tags to index their catalog to allow better search functionality. + Tags are sent by the BPP as part of the catalog response in the `on_search` + callback. Tags are also meant for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value pairs. This is particularly useful + when rendering tabular information about a product or service. + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the Tag, can be used to store detailed information. + display: + description: This value indicates if the tag is intended for display purposes. + If set to `true`, then this tag must be displayed. If it is set to `false`, + it should not be displayed. This value can override the group display + value. + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is + by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: A collection of tag objects with group level attributes. For detailed + documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the TagGroup, can be used to store detailed + information. + display: + default: true + description: Indicates the display properties of the tag group. If display + is set to false, then the group will not be displayed. If it is set to + true, it should be displayed. However, group-level display properties + can be overriden by individual tag-level display property. As this schema + is purely for catalog display purposes, it is not recommended to send + this value during search. + type: boolean + list: + description: An array of Tag objects listed under this group. This property + can be set by BAPs during search to narrow the `search` and achieve more + relevant results. When received during `on_search`, BAPs must render this + list under the heading described by the `name` property of this schema. + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in + time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track + the fulfillment of an order in real-time. which is useful for knowing the + location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: In case there is no real-time tracking endpoint available, + this field will contain the latest location of the entity being tracked. + The BPP will update this value everytime the BAP calls the track API. + status: + description: This value indicates if the tracking is currently active or + not. If this value is `active`, then the BAP can begin tracking the order. + If this value is `inactive`, the tracking URL is considered to be expired + and the BAP should stop tracking the order. + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: A URL to the tracking endpoint. This can be a link to a tracking + webpage, a webhook URL created by the BAP where BPP can push the tracking + data, or a GET url creaed by the BPP which the BAP can poll to get the + tracking data. It can also be a websocket URL where the BPP can push real-time + tracking data. + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: Describes a vehicle is a device that is designed or used to transport + people or cargo over land, water, air, or through space.
This has properties + like category, capacity, make, model, size,variant,color,energy_type,registration + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: Contains any additional or extended inputs required to confirm + an order. This is typically a Form Input. Sometimes, selection of catalog + elements is not enough for the BPP to confirm an order. For example, to confirm + a flight ticket, the airline requires details of the passengers along with + information on baggage, identity, in addition to the class of ticket. Similarly, + a logistics company may require details on the nature of shipment in order + to confirm the shipping. A recruiting firm may require additional details + on the applicant in order to confirm a job application. For all such purposes, + the BPP can choose to send this object attached to any object in the catalog + that is required to be sent while placing the order. This object can typically + be sent at an item level or at the order level. The item level XInput will + override the Order level XInput as it indicates a special requirement of information + for that particular item. Hence the BAP must render a separate form for the + Item and another form at the Order level before confirmation. + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by + the BPP to confirm the order. + type: boolean + type: object + + From b706d03328d6b9e06d4dbd53f01010e6083674d6 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 18 Jul 2024 13:35:48 +0530 Subject: [PATCH 07/12] saving temp changes --- .../example-jsons/{ => requests}/cancel.yaml | 0 .../example-jsons/{ => requests}/confirm.yaml | 0 .../example-jsons/{ => requests}/init.yaml | 0 .../example-jsons/{ => requests}/rating.yaml | 0 .../example-jsons/{ => requests}/search.yaml | 0 .../example-jsons/{ => requests}/select.yaml | 0 .../example-jsons/{ => requests}/status.yaml | 0 .../example-jsons/{ => requests}/support.yaml | 0 .../example-jsons/{ => requests}/track.yaml | 0 .../example-jsons/{ => requests}/update.yaml | 0 .../{ => responses}/on_cancel.yaml | 0 .../{ => responses}/on_confirm.yaml | 0 .../{ => responses}/on_init.yaml | 0 .../{ => responses}/on_rating.yaml | 0 .../{ => responses}/on_search.yaml | 0 .../{ => responses}/on_select.yaml | 0 .../{ => responses}/on_status.yaml | 0 .../{ => responses}/on_support.yaml | 0 .../{ => responses}/on_track.yaml | 0 .../{ => responses}/on_update.yaml | 0 .../option1/example-rules/english_rules.yaml | 107 ++++++ .../option1/example-rules/gpt_feed.yaml | 10 + .../example-rules/requests/cancel/cancel.yaml | 2 + .../requests/cancel/core_rules.yaml | 7 + .../requests/confirm/confirm.yaml | 6 + .../requests/confirm/core_rules.yaml | 29 ++ .../requests/init/core_rules.yaml | 19 + .../example-rules/requests/init/init.yaml | 4 + .../requests/rating/core_rules.yaml | 23 ++ .../example-rules/requests/rating/rating.yaml | 2 + .../search/core_rules.yaml} | 10 +- .../example-rules/requests/search/search.yaml | 2 + .../select/core_rules.yaml} | 25 +- .../example-rules/requests/select/select.yaml | 3 + .../requests/status/core_rules.yaml | 7 + .../example-rules/requests/status/status.yaml | 2 + .../requests/support/core_rules.yaml | 9 + .../requests/support/support.yaml | 2 + .../requests/track/core_rules.yaml | 7 + .../example-rules/requests/track/track.yaml | 2 + .../requests/update/core_rules.yaml | 17 + .../example-rules/requests/update/update.yaml | 2 + .../responses/on_cancel/core_rules.yaml | 40 ++ .../responses/on_cancel/on_cancel.yaml | 7 + .../responses/on_confirm/core_rule_1.yaml | 85 +++++ .../responses/on_confirm/on_confirm.yaml | 7 + .../responses/on_init/core_rules.yaml | 0 .../responses/on_init/on_init.yaml | 6 + .../responses/on_rating/core_rules.yaml | 0 .../responses/on_rating/on_rating.yaml | 0 .../responses/on_search/core_rules.yaml | 80 ++++ .../responses/on_search/on_search.yaml | 2 + .../responses/on_select/core_rules.yaml | 0 .../responses/on_select/on_select.yaml | 5 + .../responses/on_status/core_rules.yaml | 85 +++++ .../responses/on_status/on_status.yaml | 7 + .../responses/on_support/core_rules.yaml | 18 + .../responses/on_support/on_support.yaml | 2 + .../responses/on_track/core_rules.yaml | 22 ++ .../responses/on_track/on_track.yaml | 2 + .../responses/on_update/core_rules.yaml | 85 +++++ .../responses/on_update/on_update.yaml | 7 + .../option1/example-rules/search/rule2.yaml | 23 -- .../option1/example-rules/search/search.yaml | 3 - .../example-rules/shared-rules/BPPOrder.yaml | 75 ---- .../example-rules/shared-rules/bap_order.yaml | 29 ++ .../shared-rules/fulfillments_rule.yaml | 30 ++ .../shared-rules/items_rule.yaml | 27 ++ .../shared-rules/payment_rule.yaml | 36 ++ .../shared-rules/provider_rule.yaml | 22 ++ .../shared-rules/quote_rule.yaml | 27 ++ api/l2-config/option1/final.yaml | 330 ++++++++++++----- ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 341 ++++-------------- 73 files changed, 1224 insertions(+), 476 deletions(-) rename api/l2-config/option1/example-jsons/{ => requests}/cancel.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/confirm.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/init.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/rating.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/search.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/select.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/status.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/support.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/track.yaml (100%) rename api/l2-config/option1/example-jsons/{ => requests}/update.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_cancel.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_confirm.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_init.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_rating.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_search.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_select.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_status.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_support.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_track.yaml (100%) rename api/l2-config/option1/example-jsons/{ => responses}/on_update.yaml (100%) create mode 100644 api/l2-config/option1/example-rules/english_rules.yaml create mode 100644 api/l2-config/option1/example-rules/gpt_feed.yaml create mode 100644 api/l2-config/option1/example-rules/requests/cancel/cancel.yaml create mode 100644 api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/confirm/confirm.yaml create mode 100644 api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/init/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/init/init.yaml create mode 100644 api/l2-config/option1/example-rules/requests/rating/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/rating/rating.yaml rename api/l2-config/option1/example-rules/{search/rule1.yaml => requests/search/core_rules.yaml} (72%) create mode 100644 api/l2-config/option1/example-rules/requests/search/search.yaml rename api/l2-config/option1/example-rules/{shared-rules/BAPOrder.yaml => requests/select/core_rules.yaml} (58%) create mode 100644 api/l2-config/option1/example-rules/requests/select/select.yaml create mode 100644 api/l2-config/option1/example-rules/requests/status/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/status/status.yaml create mode 100644 api/l2-config/option1/example-rules/requests/support/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/support/support.yaml create mode 100644 api/l2-config/option1/example-rules/requests/track/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/track/track.yaml create mode 100644 api/l2-config/option1/example-rules/requests/update/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/requests/update/update.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_init/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_init/on_init.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_search/on_search.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_select/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_select/on_select.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_status/on_status.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_support/on_support.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_track/on_track.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml create mode 100644 api/l2-config/option1/example-rules/responses/on_update/on_update.yaml delete mode 100644 api/l2-config/option1/example-rules/search/rule2.yaml delete mode 100644 api/l2-config/option1/example-rules/search/search.yaml delete mode 100644 api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/bap_order.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/items_rule.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml create mode 100644 api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml diff --git a/api/l2-config/option1/example-jsons/cancel.yaml b/api/l2-config/option1/example-jsons/requests/cancel.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/cancel.yaml rename to api/l2-config/option1/example-jsons/requests/cancel.yaml diff --git a/api/l2-config/option1/example-jsons/confirm.yaml b/api/l2-config/option1/example-jsons/requests/confirm.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/confirm.yaml rename to api/l2-config/option1/example-jsons/requests/confirm.yaml diff --git a/api/l2-config/option1/example-jsons/init.yaml b/api/l2-config/option1/example-jsons/requests/init.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/init.yaml rename to api/l2-config/option1/example-jsons/requests/init.yaml diff --git a/api/l2-config/option1/example-jsons/rating.yaml b/api/l2-config/option1/example-jsons/requests/rating.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/rating.yaml rename to api/l2-config/option1/example-jsons/requests/rating.yaml diff --git a/api/l2-config/option1/example-jsons/search.yaml b/api/l2-config/option1/example-jsons/requests/search.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/search.yaml rename to api/l2-config/option1/example-jsons/requests/search.yaml diff --git a/api/l2-config/option1/example-jsons/select.yaml b/api/l2-config/option1/example-jsons/requests/select.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/select.yaml rename to api/l2-config/option1/example-jsons/requests/select.yaml diff --git a/api/l2-config/option1/example-jsons/status.yaml b/api/l2-config/option1/example-jsons/requests/status.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/status.yaml rename to api/l2-config/option1/example-jsons/requests/status.yaml diff --git a/api/l2-config/option1/example-jsons/support.yaml b/api/l2-config/option1/example-jsons/requests/support.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/support.yaml rename to api/l2-config/option1/example-jsons/requests/support.yaml diff --git a/api/l2-config/option1/example-jsons/track.yaml b/api/l2-config/option1/example-jsons/requests/track.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/track.yaml rename to api/l2-config/option1/example-jsons/requests/track.yaml diff --git a/api/l2-config/option1/example-jsons/update.yaml b/api/l2-config/option1/example-jsons/requests/update.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/update.yaml rename to api/l2-config/option1/example-jsons/requests/update.yaml diff --git a/api/l2-config/option1/example-jsons/on_cancel.yaml b/api/l2-config/option1/example-jsons/responses/on_cancel.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_cancel.yaml rename to api/l2-config/option1/example-jsons/responses/on_cancel.yaml diff --git a/api/l2-config/option1/example-jsons/on_confirm.yaml b/api/l2-config/option1/example-jsons/responses/on_confirm.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_confirm.yaml rename to api/l2-config/option1/example-jsons/responses/on_confirm.yaml diff --git a/api/l2-config/option1/example-jsons/on_init.yaml b/api/l2-config/option1/example-jsons/responses/on_init.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_init.yaml rename to api/l2-config/option1/example-jsons/responses/on_init.yaml diff --git a/api/l2-config/option1/example-jsons/on_rating.yaml b/api/l2-config/option1/example-jsons/responses/on_rating.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_rating.yaml rename to api/l2-config/option1/example-jsons/responses/on_rating.yaml diff --git a/api/l2-config/option1/example-jsons/on_search.yaml b/api/l2-config/option1/example-jsons/responses/on_search.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_search.yaml rename to api/l2-config/option1/example-jsons/responses/on_search.yaml diff --git a/api/l2-config/option1/example-jsons/on_select.yaml b/api/l2-config/option1/example-jsons/responses/on_select.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_select.yaml rename to api/l2-config/option1/example-jsons/responses/on_select.yaml diff --git a/api/l2-config/option1/example-jsons/on_status.yaml b/api/l2-config/option1/example-jsons/responses/on_status.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_status.yaml rename to api/l2-config/option1/example-jsons/responses/on_status.yaml diff --git a/api/l2-config/option1/example-jsons/on_support.yaml b/api/l2-config/option1/example-jsons/responses/on_support.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_support.yaml rename to api/l2-config/option1/example-jsons/responses/on_support.yaml diff --git a/api/l2-config/option1/example-jsons/on_track.yaml b/api/l2-config/option1/example-jsons/responses/on_track.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_track.yaml rename to api/l2-config/option1/example-jsons/responses/on_track.yaml diff --git a/api/l2-config/option1/example-jsons/on_update.yaml b/api/l2-config/option1/example-jsons/responses/on_update.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/on_update.yaml rename to api/l2-config/option1/example-jsons/responses/on_update.yaml diff --git a/api/l2-config/option1/example-rules/english_rules.yaml b/api/l2-config/option1/example-rules/english_rules.yaml new file mode 100644 index 0000000..78a3d17 --- /dev/null +++ b/api/l2-config/option1/example-rules/english_rules.yaml @@ -0,0 +1,107 @@ +# how to interpret this file. +# +# for each item at the 3rd level in this schema, there is a directory in the folder, +# for example there is a direcotry named "example-rules/requests/search" +# and there is a direcotry named "example-rules/responses/select" etc +# +# for each rule_name in this file, create a file with filename as +# example-rules/requests/search/.yaml if it is not already present. +# for example, for below +# +# example-rules: +# requests: +# search: +# - rule_name: core_rules +# rule_logic: "" +# +# you would add a file named "example-rules/requests/search/core_rules.yaml". +# +# in each of those files, add OpenAPI rule derived from the logic defined +# in corresponding rule_logic. +# +# now create one more file in each such direcotry with filename as +# example-rules/requests//.yaml +# for example example-rules/requests/search/search.yaml +# each of these files should import all the other files in the same direcotry +# with allOf keyword. +# +# if the rule_logic: "", ignore that rule, dont add in the folder. +# + +example-rules: + requests: + search: + - rule_name: core_rules + rule_logic: > + Intent requires fulfilment, Fulfilment requires stops, + Stops min len 2, items in stops require location, + location requires gps + select: + - rule_name: core_rules + rule_logic: "" + init: + - rule_name: core_rules + rule_logic: "" + confirm: + - rule_name: core_rules + rule_logic: "" + status: + - rule_name: core_rules + rule_logic: "" + track: + - rule_name: core_rules + rule_logic: "" + support: + - rule_name: core_rules + rule_logic: "" + update: + - rule_name: core_rules + rule_logic: "" + rating: + - rule_name: core_rules + rule_logic: "" + cancel: + - rule_name: core_rules + rule_logic: "" + responses: + on_search: + - rule_name: core_rules + rule_logic: > + catalog requires descriptor, providers + catalog.descriptor requires name, images + catalog.descriptor.images is not empty + each provider in providers requires id, descriptor, fulfillments, items, payments + provider.descriptor requires name, images + provider.descriptor.images is not empty + each payment in payments requires type, collected_by + each item in items requires descriptor, price + item.descriptor requires name + item.price requires value + on_select: + - rule_name: core_rules + rule_logic: "" + on_init: + - rule_name: core_rules + rule_logic: "" + on_confirm: + - rule_name: core_rules + rule_logic: "" + on_status: + - rule_name: core_rules + rule_logic: "" + on_track: + - rule_name: core_rules + rule_logic: "" + on_support: + - rule_name: core_rules + rule_logic: "" + on_update: + - rule_name: core_rules + rule_logic: "" + on_rating: + - rule_name: core_rules + rule_logic: "" + on_cancel: + - rule_name: core_rules + rule_logic: "" + diff --git a/api/l2-config/option1/example-rules/gpt_feed.yaml b/api/l2-config/option1/example-rules/gpt_feed.yaml new file mode 100644 index 0000000..38defde --- /dev/null +++ b/api/l2-config/option1/example-rules/gpt_feed.yaml @@ -0,0 +1,10 @@ +# Beckn schema has context and message. +# +# All the openAPI rules you add would be in the message section of the schema. +# +# +# +# +# +# +# diff --git a/api/l2-config/option1/example-rules/requests/cancel/cancel.yaml b/api/l2-config/option1/example-rules/requests/cancel/cancel.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/cancel/cancel.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml b/api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml new file mode 100644 index 0000000..708c92f --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order_id: + type: string + required: + - order_id diff --git a/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml b/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml new file mode 100644 index 0000000..dbf466e --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml @@ -0,0 +1,6 @@ +allOf: + - $ref: "../shared-rules/core_rules.yaml" + - $ref: "../shared-rules/bap_order.yaml" + - $ref: "../shared-rules/fulfillments_rule.yaml" + - $ref: "../shared-rules/payment_rule.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml b/api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml new file mode 100644 index 0000000..ebb4973 --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml @@ -0,0 +1,29 @@ +properties: + message: + properties: + order: + properties: + payment: + type: object + 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: + - payment diff --git a/api/l2-config/option1/example-rules/requests/init/core_rules.yaml b/api/l2-config/option1/example-rules/requests/init/core_rules.yaml new file mode 100644 index 0000000..d0d30ae --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/init/core_rules.yaml @@ -0,0 +1,19 @@ +properties: + message: + properties: + order: + properties: + payment: + type: object + properties: + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + required: + - type + required: + - payment diff --git a/api/l2-config/option1/example-rules/requests/init/init.yaml b/api/l2-config/option1/example-rules/requests/init/init.yaml new file mode 100644 index 0000000..a5552dd --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/init/init.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../shared-rules/core_rules.yaml" + - $ref: "../shared-rules/bap_order.yaml" + - $ref: "../shared-rules/fulfillments_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml b/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml new file mode 100644 index 0000000..928e894 --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml @@ -0,0 +1,23 @@ +properties: + message: + properties: + ratings: + type: array + minItems: 1 + items: + type: object + properties: + id: + type: string + value: + type: number + rating_category: + type: string + enum: + - RIDE + - DRIVER + - SERVICE + required: + - id + - value + - rating_category diff --git a/api/l2-config/option1/example-rules/requests/rating/rating.yaml b/api/l2-config/option1/example-rules/requests/rating/rating.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/rating/rating.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/search/rule1.yaml b/api/l2-config/option1/example-rules/requests/search/core_rules.yaml similarity index 72% rename from api/l2-config/option1/example-rules/search/rule1.yaml rename to api/l2-config/option1/example-rules/requests/search/core_rules.yaml index 1df3e40..b6f9401 100644 --- a/api/l2-config/option1/example-rules/search/rule1.yaml +++ b/api/l2-config/option1/example-rules/requests/search/core_rules.yaml @@ -4,14 +4,16 @@ properties: intent: properties: fulfillment: + type: object properties: - type: - enum: ["DELIVERY", "PICKUP"] stops: type: array + minItems: 2 items: + type: object properties: location: + type: object properties: gps: type: string @@ -19,5 +21,7 @@ properties: - gps required: - location + required: + - stops required: - - fulfillment + - fulfillment \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/search/search.yaml b/api/l2-config/option1/example-rules/requests/search/search.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/search/search.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml b/api/l2-config/option1/example-rules/requests/select/core_rules.yaml similarity index 58% rename from api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml rename to api/l2-config/option1/example-rules/requests/select/core_rules.yaml index 7df1b05..4d23ebb 100644 --- a/api/l2-config/option1/example-rules/shared-rules/BAPOrder.yaml +++ b/api/l2-config/option1/example-rules/requests/select/core_rules.yaml @@ -3,21 +3,22 @@ properties: properties: order: properties: - fulfillments: - type: array - minItems: 1 - items: - type: object - required: - - id + provider: + type: object + properties: + id: + type: string + required: + - id items: type: array - minItems: 1 items: type: object + properties: + id: + type: string required: - id - provider: - type: object - required: - - id + required: + - provider + - items diff --git a/api/l2-config/option1/example-rules/requests/select/select.yaml b/api/l2-config/option1/example-rules/requests/select/select.yaml new file mode 100644 index 0000000..537ecee --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/select/select.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "../shared-rules/bap_order.yaml" + - $ref: "../shared-rules/fulfillments_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/status/core_rules.yaml b/api/l2-config/option1/example-rules/requests/status/core_rules.yaml new file mode 100644 index 0000000..708c92f --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/status/core_rules.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order_id: + type: string + required: + - order_id diff --git a/api/l2-config/option1/example-rules/requests/status/status.yaml b/api/l2-config/option1/example-rules/requests/status/status.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/status/status.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/support/core_rules.yaml b/api/l2-config/option1/example-rules/requests/support/core_rules.yaml new file mode 100644 index 0000000..5e89242 --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/support/core_rules.yaml @@ -0,0 +1,9 @@ +properties: + message: + properties: + support: + properties: + ref_id: + type: string + required: + - ref_id diff --git a/api/l2-config/option1/example-rules/requests/support/support.yaml b/api/l2-config/option1/example-rules/requests/support/support.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/support/support.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/track/core_rules.yaml b/api/l2-config/option1/example-rules/requests/track/core_rules.yaml new file mode 100644 index 0000000..708c92f --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/track/core_rules.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order_id: + type: string + required: + - order_id diff --git a/api/l2-config/option1/example-rules/requests/track/track.yaml b/api/l2-config/option1/example-rules/requests/track/track.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/track/track.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/update/core_rules.yaml b/api/l2-config/option1/example-rules/requests/update/core_rules.yaml new file mode 100644 index 0000000..9cc1272 --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/update/core_rules.yaml @@ -0,0 +1,17 @@ +properties: + message: + type: object + properties: + order: + type: object + properties: + id: + type: string + required: + - id + update_target: + type: string + pattern: '^[^,]+(,[^,]+)*$' # Regular expression to ensure it's a comma-separated value + required: + - order + - update_target diff --git a/api/l2-config/option1/example-rules/requests/update/update.yaml b/api/l2-config/option1/example-rules/requests/update/update.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/requests/update/update.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml new file mode 100644 index 0000000..f6845d1 --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml @@ -0,0 +1,40 @@ +properties: + message: + properties: + order: + type: object + properties: + cancellation: + type: object + properties: + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + time: + type: string + format: date-time + required: + - cancelled_by + - time + fulfillments: + type: array + items: + type: object + properties: + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + enum: + - RIDE_CANCELLED + required: + - code + required: + - cancellation + - fulfillments diff --git a/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml b/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml new file mode 100644 index 0000000..775eb61 --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" + - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml b/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml new file mode 100644 index 0000000..665378f --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml @@ -0,0 +1,85 @@ +properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml b/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml new file mode 100644 index 0000000..dc6f51e --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" + - $ref: "../../shared-rules/core_rule_1.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_init/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_init/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/option1/example-rules/responses/on_init/on_init.yaml b/api/l2-config/option1/example-rules/responses/on_init/on_init.yaml new file mode 100644 index 0000000..381fa1d --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_init/on_init.yaml @@ -0,0 +1,6 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml b/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml new file mode 100644 index 0000000..8bad2ce --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml @@ -0,0 +1,80 @@ +properties: + message: + properties: + catalog: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + - images + providers: + type: array + minItems: 1 # Ensure at least one provider + items: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + - images + fulfillments: + type: array + items: + minItems: 1 # Ensure at least one fulfillment + items: + type: array + minItems: 1 # Ensure at least one item + items: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + # Add any other descriptor properties here + required: + - name + price: + type: object + properties: + value: + type: number + # Add any other price properties here + required: + - value + payments: + type: array + minItems: 1 # Ensure at least one payment + items: + type: object + properties: + type: + type: string + collected_by: + type: string + required: + - type + - collected_by + required: + - descriptor + - providers diff --git a/api/l2-config/option1/example-rules/responses/on_search/on_search.yaml b/api/l2-config/option1/example-rules/responses/on_search/on_search.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_search/on_search.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_select/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_select/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/option1/example-rules/responses/on_select/on_select.yaml b/api/l2-config/option1/example-rules/responses/on_select/on_select.yaml new file mode 100644 index 0000000..bb3b64d --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_select/on_select.yaml @@ -0,0 +1,5 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml new file mode 100644 index 0000000..665378f --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml @@ -0,0 +1,85 @@ +properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment diff --git a/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml b/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml new file mode 100644 index 0000000..775eb61 --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" + - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml new file mode 100644 index 0000000..20940f2 --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml @@ -0,0 +1,18 @@ +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"] diff --git a/api/l2-config/option1/example-rules/responses/on_support/on_support.yaml b/api/l2-config/option1/example-rules/responses/on_support/on_support.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_support/on_support.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml new file mode 100644 index 0000000..4f06dda --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml @@ -0,0 +1,22 @@ +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"] diff --git a/api/l2-config/option1/example-rules/responses/on_track/on_track.yaml b/api/l2-config/option1/example-rules/responses/on_track/on_track.yaml new file mode 100644 index 0000000..1941a2a --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_track/on_track.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml new file mode 100644 index 0000000..665378f --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml @@ -0,0 +1,85 @@ +properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + properties: + # Define properties for contact if needed + person: + type: object + properties: + # Define properties for person if needed + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment diff --git a/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml b/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml new file mode 100644 index 0000000..775eb61 --- /dev/null +++ b/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/items_rule.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/quote_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" + - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/search/rule2.yaml b/api/l2-config/option1/example-rules/search/rule2.yaml deleted file mode 100644 index 1df3e40..0000000 --- a/api/l2-config/option1/example-rules/search/rule2.yaml +++ /dev/null @@ -1,23 +0,0 @@ -properties: - message: - properties: - intent: - properties: - fulfillment: - properties: - type: - enum: ["DELIVERY", "PICKUP"] - stops: - type: array - items: - properties: - location: - properties: - gps: - type: string - required: - - gps - required: - - location - required: - - fulfillment diff --git a/api/l2-config/option1/example-rules/search/search.yaml b/api/l2-config/option1/example-rules/search/search.yaml deleted file mode 100644 index 489bcef..0000000 --- a/api/l2-config/option1/example-rules/search/search.yaml +++ /dev/null @@ -1,3 +0,0 @@ -allOf: - - $ref: "./rule1.yaml" - - $ref: "./rule2.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml b/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml deleted file mode 100644 index 3b7c550..0000000 --- a/api/l2-config/option1/example-rules/shared-rules/BPPOrder.yaml +++ /dev/null @@ -1,75 +0,0 @@ -properties: - message: - properties: - order: - properties: - fulfillments: - type: array - minItems: 1 - items: - type: object - required: - - id - - type - items: - type: array - minItems: 1 - items: - type: object - properties: - descriptor: - type: object - properties: - images: - type: array - minItems: 1 - items: - type: object - name: - type: string - short_desc: - type: string - required: - - name - - images - - short_desc - price: - type: object - properties: - currency: - type: string - value: - type: string - required: - - currency - - value - required: - - id - - descriptor - - price - provider: - type: object - properties: - descriptor: - type: object - properties: - images: - type: array - minItems: 1 - items: - type: object - name: - type: string - short_desc: - type: string - required: - - name - - images - - short_desc - required: - - id - - descriptor - required: - - provider - - items - - fulfillments diff --git a/api/l2-config/option1/example-rules/shared-rules/bap_order.yaml b/api/l2-config/option1/example-rules/shared-rules/bap_order.yaml new file mode 100644 index 0000000..f61ea92 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/bap_order.yaml @@ -0,0 +1,29 @@ +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 + not: + properties: + id: + type: string diff --git a/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml new file mode 100644 index 0000000..cccd3e6 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml @@ -0,0 +1,30 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + properties: + stops: + type: array + minItems: 2 + items: + type: object + properties: + location: + type: object + properties: + gps: + type: string + required: + - gps + required: + - location + required: + - stops + required: + - fulfillments diff --git a/api/l2-config/option1/example-rules/shared-rules/items_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/items_rule.yaml new file mode 100644 index 0000000..d0c10b7 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/items_rule.yaml @@ -0,0 +1,27 @@ +properties: + message: + properties: + order: + properties: + items: + type: array + items: + type: object + properties: + id: + type: string + price: + type: number + descriptor: + type: object + properties: + name: + type: string + required: + - name + required: + - id + - price + - descriptor + required: + - items diff --git a/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml new file mode 100644 index 0000000..0680146 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml @@ -0,0 +1,36 @@ +properties: + message: + properties: + order: + properties: + payment: + type: object + properties: + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + params: + type: object + properties: + amount: + type: number + currency: + type: string + required: + - amount + - currency + required: + - type + - status + - params + required: + - payment diff --git a/api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml new file mode 100644 index 0000000..515a1b3 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml @@ -0,0 +1,22 @@ +properties: + message: + properties: + order: + properties: + provider: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + required: + - name + required: + - id + - descriptor + required: + - provider diff --git a/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml new file mode 100644 index 0000000..4a5f161 --- /dev/null +++ b/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml @@ -0,0 +1,27 @@ +properties: + message: + properties: + order: + properties: + quote: + type: object + properties: + price: + type: number + breakup: + type: array + items: + type: object + properties: + price: + type: number + title: + type: string + required: + - price + - title + required: + - price + - breakup + required: + - quote diff --git a/api/l2-config/option1/final.yaml b/api/l2-config/option1/final.yaml index 7738c1c..b8652e6 100644 --- a/api/l2-config/option1/final.yaml +++ b/api/l2-config/option1/final.yaml @@ -44,41 +44,16 @@ paths: intent: properties: fulfillment: + type: object properties: - type: - enum: - - DELIVERY - - PICKUP - stops: - type: array - items: - properties: - location: - properties: - gps: - type: string - required: - - gps - required: - - location - required: - - fulfillment - - properties: - message: - properties: - intent: - properties: - fulfillment: - properties: - type: - enum: - - DELIVERY - - PICKUP stops: type: array + minItems: 2 items: + type: object properties: location: + type: object properties: gps: type: string @@ -86,6 +61,8 @@ paths: - gps required: - location + required: + - stops required: - fulfillment examples: @@ -756,8 +733,6 @@ paths: properties: order_id: $ref: '#/components/schemas/Order/properties/id' - required: - - order_id type: object required: - context @@ -1839,29 +1814,109 @@ paths: id: '1' type: ON-FULFILLMENT schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_search - required: - - action - error: - $ref: '#/components/schemas/Error' - message: + allOf: + - type: object properties: - catalog: - $ref: '#/components/schemas/Catalog' + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object required: - - catalog - type: object - required: - - context - type: object - description: TODO + - context + - message + - allOf: + - properties: + message: + properties: + catalog: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 + required: + - name + - images + providers: + type: array + minItems: 1 + items: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 + required: + - name + - images + fulfillments: + type: array + items: + minItems: 1 + items: + type: array + minItems: 1 + items: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + required: + - name + price: + type: object + properties: + value: + type: number + required: + - value + payments: + type: array + minItems: 1 + items: + type: object + properties: + type: + type: string + collected_by: + type: string + required: + - type + - collected_by + required: + - descriptor + - providers responses: '200': content: @@ -2114,35 +2169,144 @@ paths: value: '76' ttl: P200S schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_select - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: + allOf: + - type: object properties: - order: + context: allOf: - - $ref: '#/components/schemas/Order' - - not: - required: - - id + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - bpp_id + - bpp_uri + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + - not: + required: + - id + required: + - quote required: - - quote + - order + type: object required: - - order - type: object - required: - - context - type: object + - context + - message + - allOf: + - properties: + message: + properties: + order: + properties: + provider: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + required: + - name + required: + - id + - descriptor + required: + - provider + - properties: + message: + properties: + order: + properties: + items: + type: array + items: + type: object + properties: + id: + type: string + price: + type: number + descriptor: + type: object + properties: + name: + type: string + required: + - name + required: + - id + - price + - descriptor + required: + - items + - properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + properties: + stops: + type: array + minItems: 2 + items: + type: object + properties: + location: + type: object + properties: + gps: + type: string + required: + - gps + required: + - location + required: + - stops + required: + - fulfillments + - properties: + message: + properties: + order: + properties: + quote: + type: object + properties: + price: + type: number + breakup: + type: array + items: + type: object + properties: + price: + type: number + title: + type: string + required: + - price + - title + required: + - price + - breakup + required: + - quote description: TODO responses: '200': @@ -4630,15 +4794,7 @@ paths: message: properties: support: - allOf: - - $ref: '#/components/schemas/Support' - - anyOf: - - required: - - phone - - required: - - email - - required: - - url + $ref: '#/components/schemas/Support' type: object required: - context @@ -5448,8 +5604,6 @@ components: required: - descriptor - price - - category_ids - - fulfillment_ids type: array required: - id diff --git a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml index c3d498a..dee6be5 100644 --- a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml +++ b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml @@ -38,9 +38,9 @@ paths: required: - context - message - - $ref: "./example-rules/search/search.yaml" + - $ref: "./example-rules/requests/search/search.yaml" examples: - $ref: "./example-jsons/search.yaml" + $ref: "./example-jsons/requests/search.yaml" responses: '200': content: @@ -78,9 +78,6 @@ paths: action: enum: - select - required: - - bpp_id - - bpp_uri message: properties: order: @@ -93,7 +90,7 @@ paths: - context - message examples: - $ref: "./example-jsons/select.yaml" + $ref: "./example-jsons/requests/select.yaml" responses: '200': content: @@ -120,7 +117,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/init.yaml" + $ref: "./example-jsons/requests/init.yaml" schema: properties: context: @@ -130,16 +127,11 @@ paths: action: enum: - init - required: - - bpp_id - - bpp_uri message: properties: order: allOf: - $ref: '#/components/schemas/Order' - required: - - billing required: - order type: object @@ -176,7 +168,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/confirm.yaml" + $ref: "./example-jsons/requests/confirm.yaml" schema: properties: context: @@ -186,17 +178,11 @@ paths: action: enum: - confirm - required: - - bpp_id - - bpp_uri message: properties: order: allOf: - $ref: '#/components/schemas/Order' - required: - - billing - - payments required: - order type: object @@ -233,7 +219,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/status.yaml" + $ref: "./example-jsons/requests/status.yaml" schema: properties: context: @@ -243,15 +229,10 @@ paths: action: enum: - status - required: - - bpp_id - - bpp_uri message: properties: order_id: $ref: '#/components/schemas/Order/properties/id' - required: - - order_id type: object required: - context @@ -346,7 +327,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/rating.yaml" + $ref: "./example-jsons/requests/rating.yaml" schema: properties: context: @@ -356,16 +337,12 @@ paths: action: enum: - rating - required: - - bpp_id - - bpp_uri message: properties: ratings: + type: array items: $ref: '#/components/schemas/Rating' - minItems: 1 - type: array type: object required: - context @@ -400,7 +377,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/support.yaml" + $ref: "./example-jsons/requests/support.yaml" schema: properties: context: @@ -410,15 +387,10 @@ paths: action: enum: - support - required: - - bpp_id - - bpp_uri message: properties: support: $ref: '#/components/schemas/Support' - required: - - ref_id type: object required: - context @@ -453,7 +425,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/track.yaml" + $ref: "./example-jsons/requests/track.yaml" schema: properties: context: @@ -463,9 +435,6 @@ paths: action: enum: - track - required: - - bpp_id - - bpp_uri message: additionalProperties: false properties: @@ -474,8 +443,6 @@ paths: type: string order_id: $ref: '#/components/schemas/Order/properties/id' - required: - - order_id type: object required: - context @@ -510,7 +477,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/cancel.yaml" + $ref: "./example-jsons/requests/cancel.yaml" schema: properties: context: @@ -520,9 +487,6 @@ paths: action: enum: - cancel - required: - - bpp_id - - bpp_uri message: properties: cancellation_reason_id: @@ -531,8 +495,6 @@ paths: $ref: '#/components/schemas/Descriptor' order_id: $ref: '#/components/schemas/Order/properties/id' - required: - - order_id type: object required: - context @@ -567,31 +529,33 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_search.yaml" + $ref: "./example-jsons/responses/on_search.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_search - required: - - action - error: - $ref: '#/components/schemas/Error' - message: + allOf: + - type: object properties: - catalog: - $ref: '#/components/schemas/Catalog' + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object required: - - catalog - type: object - required: - - context - type: object - description: TODO + - context + - message + - $ref: "./example-rules/responses/on_search/on_search.yaml" responses: '200': content: @@ -621,37 +585,32 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_select.yaml" + $ref: "./example-jsons/responses/on_select.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_select - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: + allOf: + - type: object properties: - order: + context: allOf: - - $ref: '#/components/schemas/Order' - - not: - required: - - id + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' required: - - quote + - order + type: object required: - - order - type: object - required: - - context - type: object + - context + - message + - $ref: "./example-rules/responses/on_select/on_select.yaml" description: TODO responses: '200': @@ -681,7 +640,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_init.yaml" + $ref: "./example-jsons/responses/on_init.yaml" schema: properties: context: @@ -691,9 +650,6 @@ paths: action: enum: - on_init - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: @@ -701,13 +657,6 @@ paths: order: allOf: - $ref: '#/components/schemas/Order' - - not: - required: - - id - required: - - quote - - billing - - payments required: - order type: object @@ -743,7 +692,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_confirm.yaml" + $ref: "./example-jsons/responses/on_confirm.yaml" schema: properties: context: @@ -753,36 +702,12 @@ paths: action: enum: - on_confirm - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: properties: order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - state - - agent - type: array - required: - - quote - - billing - - payments - - id + $ref: '#/components/schemas/Order' required: - order type: object @@ -818,7 +743,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_status.yaml" + $ref: "./example-jsons/responses/on_status.yaml" schema: properties: context: @@ -828,37 +753,12 @@ paths: action: enum: - on_status - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: properties: order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id + $ref: '#/components/schemas/Order' required: - order type: object @@ -894,7 +794,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_update.yaml" + $ref: "./example-jsons/responses/on_update.yaml" schema: properties: context: @@ -904,9 +804,6 @@ paths: action: enum: - on_update - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: @@ -914,27 +811,6 @@ paths: order: allOf: - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id required: - order type: object @@ -970,7 +846,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_rating.yaml" + $ref: "./example-jsons/responses/on_rating.yaml" schema: properties: context: @@ -980,9 +856,6 @@ paths: action: enum: - on_rating - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: @@ -995,6 +868,7 @@ paths: type: object required: - context + - message type: object description: TODO responses: @@ -1025,7 +899,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_support.yaml" + $ref: "./example-jsons/responses/on_support.yaml" schema: properties: context: @@ -1035,23 +909,12 @@ paths: action: enum: - on_support - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: properties: support: - allOf: - - $ref: '#/components/schemas/Support' - - anyOf: - - required: - - phone - - required: - - email - - required: - - url + $ref: '#/components/schemas/Support' type: object required: - context @@ -1085,7 +948,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_track.yaml" + $ref: "./example-jsons/responses/on_track.yaml" schema: properties: context: @@ -1095,9 +958,6 @@ paths: action: enum: - on_track - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: @@ -1140,7 +1000,7 @@ paths: content: application/json: examples: - $ref: "./example-jsons/on_cancel.yaml" + $ref: "./example-jsons/responses/on_cancel.yaml" schema: properties: context: @@ -1150,9 +1010,6 @@ paths: action: enum: - on_cancel - required: - - bpp_id - - bpp_uri error: $ref: '#/components/schemas/Error' message: @@ -1160,28 +1017,6 @@ paths: order: allOf: - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - - cancellation required: - order type: object @@ -1358,9 +1193,6 @@ components: - $ref: '#/components/schemas/Descriptor' description: Any additional information regarding the nature of cancellation cancelled_by: - enum: - - CONSUMER - - PROVIDER type: string reason: allOf: @@ -1370,9 +1202,6 @@ components: description: Date-time when the order was cancelled by the buyer format: date-time type: string - required: - - time - - cancelled_by type: object CancellationTerm: additionalProperties: false @@ -1425,7 +1254,6 @@ components: a BPP itself offers fulfillments on behalf of the providers it has onboarded. items: $ref: '#/components/schemas/Fulfillment' - minItems: 1 type: array offers: description: Offers at the BPP-level. This is common across all providers @@ -1441,42 +1269,11 @@ components: type: array providers: items: - allOf: - - $ref: '#/components/schemas/Provider' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - items: - items: - allOf: - - $ref: '#/components/schemas/Item' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - required: - - descriptor - - price - - category_ids - - fulfillment_ids - type: array - required: - - id - - categories - - descriptor - - items - minItems: 1 + $ref: '#/components/schemas/Provider' type: array ttl: description: Duration in seconds after which this catalog will expire type: string - required: - - providers type: object Category: additionalProperties: false From 64bc70c3f5dd66045e743a45c1f097e05d7269be Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 18 Jul 2024 18:44:30 +0530 Subject: [PATCH 08/12] working with base rules --- .../requests/confirm/confirm.yaml | 7 +- .../example-rules/requests/init/init.yaml | 6 +- .../requests/rating/core_rules.yaml | 2 +- .../example-rules/requests/select/select.yaml | 4 +- .../responses/on_cancel/on_cancel.yaml | 2 +- .../responses/on_confirm/core_rule_1.yaml | 8 - .../responses/on_confirm/on_confirm.yaml | 2 +- .../responses/on_rating/core_rules.yaml | 20 + .../responses/on_rating/on_rating.yaml | 2 + .../responses/on_status/core_rules.yaml | 8 - .../responses/on_status/on_status.yaml | 2 +- .../responses/on_update/core_rules.yaml | 13 - .../responses/on_update/on_update.yaml | 2 +- .../shared-rules/fulfillments_rule.yaml | 23 + .../shared-rules/payment_rule.yaml | 7 +- .../shared-rules/quote_rule.yaml | 15 +- api/l2-config/option1/final.yaml | 1941 ++++++++++------- ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 808 ++++--- 18 files changed, 1605 insertions(+), 1267 deletions(-) diff --git a/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml b/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml index dbf466e..84d48d4 100644 --- a/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml +++ b/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml @@ -1,6 +1,5 @@ allOf: - - $ref: "../shared-rules/core_rules.yaml" - - $ref: "../shared-rules/bap_order.yaml" - - $ref: "../shared-rules/fulfillments_rule.yaml" - - $ref: "../shared-rules/payment_rule.yaml" + - $ref: "../../shared-rules/bap_order.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" + - $ref: "../../shared-rules/payment_rule.yaml" - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/init/init.yaml b/api/l2-config/option1/example-rules/requests/init/init.yaml index a5552dd..1c8a72f 100644 --- a/api/l2-config/option1/example-rules/requests/init/init.yaml +++ b/api/l2-config/option1/example-rules/requests/init/init.yaml @@ -1,4 +1,4 @@ allOf: - - $ref: "../shared-rules/core_rules.yaml" - - $ref: "../shared-rules/bap_order.yaml" - - $ref: "../shared-rules/fulfillments_rule.yaml" \ No newline at end of file + - $ref: "./core_rules.yaml" + - $ref: "../../shared-rules/bap_order.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml b/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml index 928e894..96e6615 100644 --- a/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml +++ b/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml @@ -14,7 +14,7 @@ properties: rating_category: type: string enum: - - RIDE + - RIDER - DRIVER - SERVICE required: diff --git a/api/l2-config/option1/example-rules/requests/select/select.yaml b/api/l2-config/option1/example-rules/requests/select/select.yaml index 537ecee..445f70e 100644 --- a/api/l2-config/option1/example-rules/requests/select/select.yaml +++ b/api/l2-config/option1/example-rules/requests/select/select.yaml @@ -1,3 +1,3 @@ allOf: - - $ref: "../shared-rules/bap_order.yaml" - - $ref: "../shared-rules/fulfillments_rule.yaml" \ No newline at end of file + - $ref: "../../shared-rules/bap_order.yaml" + - $ref: "../../shared-rules/fulfillments_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml b/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml index 775eb61..79be567 100644 --- a/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml +++ b/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml @@ -4,4 +4,4 @@ allOf: - $ref: "../../shared-rules/fulfillments_rule.yaml" - $ref: "../../shared-rules/quote_rule.yaml" - $ref: "../../shared-rules/payment_rule.yaml" - - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml b/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml index 665378f..5ab9e86 100644 --- a/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml +++ b/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml @@ -11,12 +11,8 @@ properties: properties: contact: type: object - properties: - # Define properties for contact if needed person: type: object - properties: - # Define properties for person if needed required: - contact - person @@ -25,12 +21,8 @@ properties: properties: contact: type: object - properties: - # Define properties for contact if needed person: type: object - properties: - # Define properties for person if needed required: - contact - person diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml b/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml index dc6f51e..85d89e9 100644 --- a/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml +++ b/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml @@ -4,4 +4,4 @@ allOf: - $ref: "../../shared-rules/fulfillments_rule.yaml" - $ref: "../../shared-rules/quote_rule.yaml" - $ref: "../../shared-rules/payment_rule.yaml" - - $ref: "../../shared-rules/core_rule_1.yaml" \ No newline at end of file + - $ref: "./core_rule_1.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml index e69de29..dd85573 100644 --- a/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml +++ b/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml @@ -0,0 +1,20 @@ +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 diff --git a/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml b/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml index e69de29..1941a2a 100644 --- a/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml +++ b/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml index 665378f..5ab9e86 100644 --- a/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml +++ b/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml @@ -11,12 +11,8 @@ properties: properties: contact: type: object - properties: - # Define properties for contact if needed person: type: object - properties: - # Define properties for person if needed required: - contact - person @@ -25,12 +21,8 @@ properties: properties: contact: type: object - properties: - # Define properties for contact if needed person: type: object - properties: - # Define properties for person if needed required: - contact - person diff --git a/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml b/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml index 775eb61..79be567 100644 --- a/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml +++ b/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml @@ -4,4 +4,4 @@ allOf: - $ref: "../../shared-rules/fulfillments_rule.yaml" - $ref: "../../shared-rules/quote_rule.yaml" - $ref: "../../shared-rules/payment_rule.yaml" - - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml b/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml index 665378f..18d9b77 100644 --- a/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml +++ b/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml @@ -8,15 +8,6 @@ properties: properties: agent: type: object - properties: - contact: - type: object - properties: - # Define properties for contact if needed - person: - type: object - properties: - # Define properties for person if needed required: - contact - person @@ -25,12 +16,8 @@ properties: properties: contact: type: object - properties: - # Define properties for contact if needed person: type: object - properties: - # Define properties for person if needed required: - contact - person diff --git a/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml b/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml index 775eb61..79be567 100644 --- a/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml +++ b/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml @@ -4,4 +4,4 @@ allOf: - $ref: "../../shared-rules/fulfillments_rule.yaml" - $ref: "../../shared-rules/quote_rule.yaml" - $ref: "../../shared-rules/payment_rule.yaml" - - $ref: "../../shared-rules/core_rules.yaml" \ No newline at end of file + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml index cccd3e6..51262da 100644 --- a/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml +++ b/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml @@ -22,8 +22,31 @@ properties: type: string required: - gps + type: + type: string + enum: + - START + - END required: - location + - type + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + enum: + - DRIVER_EN_ROUTE_TO_PICKUP + - DRIVER_AT_PICKUP + - RIDE_STARTED + - RIDE_ENDED + - RIDE_CANCELLED + - PAYMENT_COLLECTED + required: + - code required: - stops required: diff --git a/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml index 0680146..2b74236 100644 --- a/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml +++ b/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml @@ -18,6 +18,12 @@ properties: enum: - PAID - NOT-PAID + collected_by: + type: string + enum: + - DRIVER + - DRIVER_APP + - RIDER_APP params: type: object properties: @@ -31,6 +37,5 @@ properties: required: - type - status - - params required: - payment diff --git a/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml b/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml index 4a5f161..dd9dfc4 100644 --- a/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml +++ b/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml @@ -7,7 +7,15 @@ properties: type: object properties: price: - type: number + type: object + properties: + currency: + type: string + value: + type: number + required: + - currency + - value breakup: type: array items: @@ -17,6 +25,11 @@ properties: type: number title: type: string + enum: + - BASE FARE + - TAX + - DISCOUNT + - WAITING CHARGE required: - price - title diff --git a/api/l2-config/option1/final.yaml b/api/l2-config/option1/final.yaml index b8652e6..13d3b1b 100644 --- a/api/l2-config/option1/final.yaml +++ b/api/l2-config/option1/final.yaml @@ -151,29 +151,30 @@ paths: content: application/json: schema: - type: object - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - select - required: - - bpp_id - - bpp_uri - message: + allOf: + - type: object properties: - order: + context: allOf: - - $ref: '#/components/schemas/Order' + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order - type: object - required: - - context - - message + - context + - message + - allOf: + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $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: @@ -367,6 +368,129 @@ paths: requestBody: content: application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + - allOf: + - properties: + message: + properties: + order: + properties: + payment: + type: object + properties: + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + required: + - type + required: + - payment + - 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 + not: + properties: + id: + type: string + - properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + properties: + stops: + type: array + minItems: 2 + items: + type: object + properties: + location: + type: object + properties: + gps: + type: string + required: + - gps + type: + type: string + enum: + - START + - END + required: + - location + - type + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + enum: + - DRIVER_EN_ROUTE_TO_PICKUP + - DRIVER_AT_PICKUP + - RIDE_STARTED + - RIDE_ENDED + - RIDE_CANCELLED + - PAYMENT_COLLECTED + required: + - code + required: + - stops + required: + - fulfillments examples: Initialize draft order and request for terms of service: value: @@ -462,32 +586,6 @@ paths: - id: '1' provider: id: '1' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - init - required: - - bpp_id - - bpp_uri - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - required: - - billing - required: - - order - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -516,6 +614,101 @@ paths: requestBody: content: application/json: + schema: + allOf: + - properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + 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/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - properties: + message: + properties: + order: + properties: + payment: + type: object + properties: + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + collected_by: + type: string + enum: + - DRIVER + - DRIVER_APP + - RIDER_APP + params: + type: object + properties: + amount: + type: number + currency: + type: string + required: + - amount + - currency + required: + - type + - status + required: + - payment + - properties: + message: + properties: + order: + properties: + payment: + type: object + 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: + - payment examples: Confirm ride booking: value: @@ -621,33 +814,6 @@ paths: transaction_id: '24566345563' provider: id: '1' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - confirm - required: - - bpp_id - - bpp_uri - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - required: - - billing - - payments - required: - - order - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -676,6 +842,33 @@ paths: requestBody: content: application/json: + schema: + allOf: + - properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + message: + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + type: object + required: + - context + - message + type: object + - allOf: + - properties: + message: + properties: + order_id: + type: string + required: + - order_id examples: Get latest fulfillment status of a booking: value: @@ -717,27 +910,6 @@ paths: version: 1.1.0 message: order_id: '123413' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - status - required: - - bpp_id - - bpp_uri - message: - properties: - order_id: - $ref: '#/components/schemas/Order/properties/id' - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -767,36 +939,55 @@ paths: content: application/json: schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - update - required: - - bpp_id - - bpp_uri - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' - description: Updated order object + - $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: - - id - update_target: - description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' - type: string + - update_target + - order + type: object required: - - update_target - - order + - context + - message type: object - required: - - context - - message - type: object + - allOf: + - 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': @@ -825,6 +1016,51 @@ paths: 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: + - 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: @@ -849,31 +1085,6 @@ paths: - id: b0462745-f6c9-4100-bbe7-4fa3648b6b40 rating_category: DRIVER value: 4 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - rating - required: - - bpp_id - - bpp_uri - message: - properties: - ratings: - items: - $ref: '#/components/schemas/Rating' - minItems: 1 - type: array - type: object - required: - - context - - message - type: object - description: TODO responses: '200': content: @@ -901,6 +1112,35 @@ paths: 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: + - properties: + message: + properties: + support: + properties: + ref_id: + type: string + required: + - ref_id examples: Fetch support information related to a particular order: value: @@ -925,29 +1165,6 @@ paths: email: johndoe@gmail.com phone: 91-876787656 ref_id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - support - required: - - bpp_id - - bpp_uri - message: - properties: - support: - $ref: '#/components/schemas/Support' - required: - - ref_id - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -976,6 +1193,37 @@ paths: 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: + - properties: + message: + properties: + order_id: + type: string + required: + - order_id examples: Track an active ride: value: @@ -997,33 +1245,6 @@ paths: version: 1.1.0 message: order_id: 22e090fc-b8b1-4437-9126-ff7a71c7845c - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - track - required: - - bpp_id - - bpp_uri - message: - additionalProperties: false - properties: - callback_url: - format: uri - type: string - order_id: - $ref: '#/components/schemas/Order/properties/id' - required: - - order_id - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -1052,6 +1273,37 @@ paths: 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: + - properties: + message: + properties: + order_id: + type: string + required: + - order_id examples: Cancel a ride with selected reason: value: @@ -1117,33 +1369,6 @@ paths: order: cancellation_reason_id: '2' id: '123413' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - cancel - required: - - bpp_id - - bpp_uri - message: - properties: - cancellation_reason_id: - $ref: '#/components/schemas/Option/properties/id' - descriptor: - $ref: '#/components/schemas/Descriptor' - order_id: - $ref: '#/components/schemas/Order/properties/id' - required: - - order_id - type: object - required: - - context - - message - type: object description: TODO responses: '200': @@ -1172,6 +1397,110 @@ paths: requestBody: content: application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + error: + $ref: '#/components/schemas/Error' + message: + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + type: object + required: + - context + - message + - allOf: + - properties: + message: + properties: + catalog: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 + required: + - name + - images + providers: + type: array + minItems: 1 + items: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 + required: + - name + - images + fulfillments: + type: array + items: + minItems: 1 + items: + type: array + minItems: 1 + items: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + required: + - name + price: + type: object + properties: + value: + type: number + required: + - value + payments: + type: array + minItems: 1 + items: + type: object + properties: + type: + type: string + collected_by: + type: string + required: + - type + - collected_by + required: + - descriptor + - providers examples: Return a mobility catalog with multiple providers: value: @@ -1813,110 +2142,6 @@ paths: - collected_by: BPP id: '1' type: ON-FULFILLMENT - schema: - allOf: - - type: object - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_search - required: - - action - error: - $ref: '#/components/schemas/Error' - message: - properties: - catalog: - $ref: '#/components/schemas/Catalog' - required: - - catalog - type: object - required: - - context - - message - - allOf: - - properties: - message: - properties: - catalog: - type: object - properties: - descriptor: - type: object - properties: - name: - type: string - images: - type: array - items: - minItems: 1 - required: - - name - - images - providers: - type: array - minItems: 1 - items: - type: object - properties: - id: - type: string - descriptor: - type: object - properties: - name: - type: string - images: - type: array - items: - minItems: 1 - required: - - name - - images - fulfillments: - type: array - items: - minItems: 1 - items: - type: array - minItems: 1 - items: - type: object - properties: - descriptor: - type: object - properties: - name: - type: string - required: - - name - price: - type: object - properties: - value: - type: number - required: - - value - payments: - type: array - minItems: 1 - items: - type: object - properties: - type: - type: string - collected_by: - type: string - required: - - type - - collected_by - required: - - descriptor - - providers responses: '200': content: @@ -1945,6 +2170,35 @@ paths: requestBody: content: application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object + required: + - context + - message + - allOf: + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3' examples: Return a quote offered by a public transit service provider: value: @@ -2168,20 +2422,44 @@ paths: 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 + requestBody: + content: + application/json: schema: allOf: - - type: object - properties: + - properties: context: allOf: - $ref: '#/components/schemas/Context' - properties: action: enum: - - on_select - required: - - bpp_id - - bpp_uri + - on_init error: $ref: '#/components/schemas/Error' message: @@ -2189,17 +2467,12 @@ paths: order: allOf: - $ref: '#/components/schemas/Order' - - not: - required: - - id - required: - - quote required: - order type: object required: - context - - message + type: object - allOf: - properties: message: @@ -2250,36 +2523,7 @@ paths: - descriptor required: - items - - properties: - message: - properties: - order: - properties: - fulfillments: - type: array - minItems: 1 - items: - type: object - properties: - stops: - type: array - minItems: 2 - items: - type: object - properties: - location: - type: object - properties: - gps: - type: string - required: - - gps - required: - - location - required: - - stops - required: - - fulfillments + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' - properties: message: properties: @@ -2289,7 +2533,15 @@ paths: type: object properties: price: - type: number + type: object + properties: + currency: + type: string + value: + type: number + required: + - currency + - value breakup: type: array items: @@ -2299,6 +2551,11 @@ paths: type: number title: type: string + enum: + - BASE FARE + - TAX + - DISCOUNT + - WAITING CHARGE required: - price - title @@ -2307,34 +2564,7 @@ paths: - breakup required: - quote - 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 - requestBody: - content: - application/json: + - $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' examples: Return draft order for transit ticket with T+1 settlment via bank transfer: value: @@ -2705,38 +2935,6 @@ paths: price: currency: INR value: '81' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_init - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - - not: - required: - - id - required: - - quote - - billing - - payments - required: - - order - type: object - required: - - context - type: object description: TODO responses: '200': @@ -2765,6 +2963,112 @@ paths: requestBody: content: application/json: + schema: + allOf: + - type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + type: object + required: + - context + - message + - allOf: + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3' + - $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + properties: + contact: + type: object + person: + type: object + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + person: + type: object + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment examples: Return confirmed order with latest fulfillment details: value: @@ -3158,51 +3462,6 @@ paths: price: currency: '60.5' value: INR - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_confirm - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - state - - agent - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object description: TODO responses: '200': @@ -3231,6 +3490,111 @@ paths: requestBody: content: application/json: + schema: + allOf: + - properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + type: object + required: + - context + type: object + - allOf: + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3' + - $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + properties: + contact: + type: object + person: + type: object + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + person: + type: object + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment examples: Return order with latest fulfillment status - Driver en-route to pickup: value: @@ -4197,52 +4561,6 @@ paths: price: currency: '60.5' value: INR - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_status - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object description: TODO responses: '200': @@ -4271,6 +4589,107 @@ paths: 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/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3' + - $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - properties: + message: + properties: + order: + properties: + fulfillment: + type: object + properties: + agent: + type: object + required: + - contact + - person + customer: + type: object + properties: + contact: + type: object + person: + type: object + required: + - contact + - person + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + required: + - code + required: + - descriptor + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + required: + - agent + - customer + - state + - vehicle + payment: + type: object + 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: + - fulfillment + - payment examples: Return updated order with payment transaction status: value: @@ -4602,52 +5021,6 @@ paths: price: currency: INR value: '75' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_update - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object description: TODO responses: '200': @@ -4676,6 +5049,50 @@ paths: 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: + - 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: @@ -4700,30 +5117,6 @@ paths: mime_type: text/html url: 'https://www.example.com/feedbackform' required: true - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_rating - required: - - bpp_id - - bpp_uri - 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 - type: object description: TODO responses: '200': @@ -4752,6 +5145,48 @@ paths: 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: + - 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: @@ -4777,28 +5212,6 @@ paths: phone: '+918068870525' ref_id: 1386183jkgsgfjsf url: 'https://support.example-bpp.com/gethelp' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_support - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - support: - $ref: '#/components/schemas/Support' - type: object - required: - - context - type: object description: TODO responses: '200': @@ -4827,6 +5240,53 @@ paths: 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: + - 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: @@ -4849,30 +5309,6 @@ paths: tracking: status: active url: 'https://api.beckn.juspay.in/dobpp/ui/driver/location/abc9f0aa-bbfd-4e91-b378-41feee12f05f' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_track - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - tracking: - $ref: '#/components/schemas/Tracking' - required: - - tracking - type: object - required: - - context - type: object description: TODO responses: '200': @@ -4901,6 +5337,75 @@ paths: 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/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/0' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/1' + - $ref: '#/paths/~1init/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/3' + - $ref: '#/paths/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/2' + - properties: + message: + properties: + order: + type: object + properties: + cancellation: + type: object + properties: + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + time: + type: string + format: date-time + required: + - cancelled_by + - time + fulfillments: + type: array + items: + type: object + properties: + state: + type: object + properties: + descriptor: + type: object + properties: + code: + type: string + enum: + - RIDE_CANCELLED + required: + - code + required: + - cancellation + - fulfillments examples: Return cancelled ticket order with cancellation charges: value: @@ -5324,53 +5829,6 @@ paths: price: currency: INR value: '0' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_cancel - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - - cancellation - required: - - order - type: object - required: - - context - type: object description: TODO responses: '200': @@ -5514,9 +5972,6 @@ components: - $ref: '#/components/schemas/Descriptor' description: Any additional information regarding the nature of cancellation cancelled_by: - enum: - - CONSUMER - - PROVIDER type: string reason: allOf: @@ -5526,9 +5981,6 @@ components: description: Date-time when the order was cancelled by the buyer format: date-time type: string - required: - - time - - cancelled_by type: object CancellationTerm: additionalProperties: false @@ -5569,7 +6021,6 @@ components: description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. items: $ref: '#/components/schemas/Fulfillment' - minItems: 1 type: array offers: description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. @@ -5583,40 +6034,11 @@ components: type: array providers: items: - allOf: - - $ref: '#/components/schemas/Provider' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - items: - items: - allOf: - - $ref: '#/components/schemas/Item' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - required: - - descriptor - - price - type: array - required: - - id - - categories - - descriptor - - items - minItems: 1 + $ref: '#/components/schemas/Provider' type: array ttl: description: Duration in seconds after which this catalog will expire type: string - required: - - providers type: object Category: additionalProperties: false @@ -5913,7 +6335,6 @@ components: description: The list of logical stops encountered during the fulfillment of an order. items: $ref: '#/components/schemas/Stop' - minItems: 2 type: array tags: items: @@ -5928,26 +6349,13 @@ components: type: string vehicle: $ref: '#/components/schemas/Vehicle' - required: - - stops type: object FulfillmentState: additionalProperties: false description: Describes the state of fulfillment properties: descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - - properties: - code: - enum: - - DRIVER_EN_ROUTE_TO_PICKUP - - DRIVER_AT_PICKUP - - RIDE_STARTED - - RIDE_ENDED - - RIDE_CANCELLED - - PAYMENT_COLLECTED - type: string + $ref: '#/components/schemas/Descriptor' updated_at: format: date-time type: string @@ -6022,8 +6430,6 @@ components: items: $ref: '#/components/schemas/TagGroup' type: array - required: - - fulfillment type: object Item: additionalProperties: false @@ -6345,7 +6751,6 @@ components: description: The fulfillments involved in completing this order items: $ref: '#/components/schemas/Fulfillment' - minItems: 1 type: array id: description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. @@ -6354,7 +6759,6 @@ components: description: The items purchased / availed in this order items: $ref: '#/components/schemas/Item' - minItems: 1 type: array offers: description: The offers applied in this order @@ -6449,10 +6853,6 @@ components: properties: collected_by: description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' - enum: - - DRIVER - - DRIVER_APP - - RIDER_APP type: string id: description: ID of the payment term that can be referred at an item or an order level in a catalog @@ -6478,14 +6878,8 @@ components: type: string virtual_payment_address: type: string - required: - - amount - - currency type: object status: - enum: - - PAID - - NOT-PAID type: string tags: items: @@ -6494,20 +6888,11 @@ components: time: $ref: '#/components/schemas/Time' type: - enum: - - PRE-ORDER - - PRE-FULFILLMENT - - ON-FULFILLMENT - - POST-FULFILLMENT type: string url: description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' format: uri type: string - required: - - collected_by - - type - - status type: object Person: additionalProperties: false @@ -6593,7 +6978,6 @@ components: categories: items: $ref: '#/components/schemas/Category' - minItems: 1 type: array category_id: description: Category Id of the provider at the BPP-level catalog @@ -6614,7 +6998,6 @@ components: items: items: $ref: '#/components/schemas/Item' - minItems: 1 type: array locations: items: @@ -6655,22 +7038,10 @@ components: item: $ref: '#/components/schemas/Item' price: - allOf: - - $ref: '#/components/schemas/Price' - required: - - value + $ref: '#/components/schemas/Price' title: - enum: - - BASE FARE - - TAX - - DISCOUNT - - WAITING CHARGE type: string - required: - - title - - price type: object - minItems: 1 type: array id: description: ID of the quote. @@ -6680,15 +7051,8 @@ components: allOf: - $ref: '#/components/schemas/Price' description: The total quoted price - required: - - currency - - value ttl: $ref: '#/components/schemas/Duration' - required: - - price - - breakup - - ttl type: object Rating: additionalProperties: false @@ -6699,18 +7063,10 @@ components: type: string rating_category: description: Category of the entity being rated - enum: - - RIDE - - DRIVER - - SERVICE type: string value: description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' type: string - required: - - rating_category - - id - - value type: object Region: additionalProperties: false @@ -6753,8 +7109,6 @@ components: allOf: - $ref: '#/components/schemas/Time' description: 'Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement' - required: - - replace_within type: object ReturnTerm: additionalProperties: false @@ -6762,9 +7116,6 @@ components: properties: fulfillment_managed_by: description: The entity that will perform the return - enum: - - CONSUMER - - PROVIDER type: string fulfillment_state: allOf: @@ -6781,8 +7132,6 @@ components: allOf: - $ref: '#/components/schemas/Time' description: 'Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund.' - required: - - return_time type: object Scalar: additionalProperties: false @@ -6892,8 +7241,6 @@ components: url: format: uri type: string - required: - - ref_id type: object Tag: additionalProperties: false diff --git a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml index dee6be5..5bb5e4b 100644 --- a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml +++ b/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml @@ -69,26 +69,28 @@ paths: content: application/json: schema: - type: object - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - select - message: + allOf: + - type: object properties: - order: + context: allOf: - - $ref: '#/components/schemas/Order' + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order - type: object - required: - - context - - message + - context + - message + - $ref: "./example-rules/requests/select/select.yaml" examples: $ref: "./example-jsons/requests/select.yaml" responses: @@ -116,29 +118,30 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/init.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - init - message: + allOf: + - type: object properties: - order: + context: allOf: - - $ref: '#/components/schemas/Order' + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order required: - - order - type: object - required: - - context - - message - type: object + - context + - message + - $ref: "./example-rules/requests/init/init.yaml" + examples: + $ref: "./example-jsons/requests/init.yaml" description: TODO responses: '200': @@ -167,29 +170,31 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/confirm.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - confirm - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order + - context + - message type: object - required: - - context - - message - type: object + - $ref: "./example-rules/requests/confirm/confirm.yaml" + examples: + $ref: "./example-jsons/requests/confirm.yaml" description: TODO responses: '200': @@ -218,26 +223,28 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/status.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - status - message: - properties: - order_id: - $ref: '#/components/schemas/Order/properties/id' + allOf: + - properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + message: + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + type: object + required: + - context + - message type: object - required: - - context - - message - type: object + - $ref: "./example-rules/requests/status/status.yaml" + examples: + $ref: "./example-jsons/requests/status.yaml" description: TODO responses: '200': @@ -267,37 +274,39 @@ paths: content: application/json: schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - update - required: - - bpp_id - - bpp_uri - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' - description: Updated order object + - $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: - - id - update_target: - description: 'Comma separated values of order objects being - updated. For example: ```"update_target":"item,billing,fulfillment"```' - type: string + - update_target + - order + type: object required: - - update_target - - order + - context + - message type: object - required: - - context - - message - type: object + - $ref: "./example-rules/requests/update/update.yaml" description: TODO responses: '200': @@ -326,29 +335,30 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/rating.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - rating - message: - properties: - ratings: - type: array - items: - $ref: '#/components/schemas/Rating' + 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 - required: - - context - - message - type: object - description: TODO + - $ref: "./example-rules/requests/rating/rating.yaml" + examples: + $ref: "./example-jsons/requests/rating.yaml" responses: '200': content: @@ -376,26 +386,28 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/support.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - support - message: - properties: - support: - $ref: '#/components/schemas/Support' + 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 - required: - - context - - message - type: object + - $ref: "./example-rules/requests/support/support.yaml" + examples: + $ref: "./example-jsons/requests/support.yaml" description: TODO responses: '200': @@ -424,30 +436,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/track.yaml" schema: - 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' + 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 - required: - - context - - message - type: object + - $ref: "./example-rules/requests/track/track.yaml" + examples: + $ref: "./example-jsons/requests/track.yaml" description: TODO responses: '200': @@ -476,30 +490,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/requests/cancel.yaml" schema: - 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' + 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 - required: - - context - - message - type: object + - $ref: "./example-rules/requests/cancel/cancel.yaml" + examples: + $ref: "./example-jsons/requests/cancel.yaml" description: TODO responses: '200': @@ -528,8 +544,6 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_search.yaml" schema: allOf: - type: object @@ -556,6 +570,8 @@ paths: - context - message - $ref: "./example-rules/responses/on_search/on_search.yaml" + examples: + $ref: "./example-jsons/responses/on_search.yaml" responses: '200': content: @@ -584,8 +600,6 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_select.yaml" schema: allOf: - type: object @@ -611,6 +625,8 @@ paths: - context - message - $ref: "./example-rules/responses/on_select/on_select.yaml" + examples: + $ref: "./example-jsons/responses/on_select.yaml" description: TODO responses: '200': @@ -639,30 +655,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_init.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_init - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + allOf: + - $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order + - context type: object - required: - - context - type: object + - $ref: "./example-rules/responses/on_init/on_init.yaml" + examples: + $ref: "./example-jsons/responses/on_init.yaml" description: TODO responses: '200': @@ -691,29 +709,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_confirm.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_confirm - error: - $ref: '#/components/schemas/Error' - message: + allOf: + - type: object properties: - order: - $ref: '#/components/schemas/Order' + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order - type: object - required: - - context - type: object + - context + - message + - $ref: "example-rules/responses/on_confirm/on_confirm.yaml" + examples: + $ref: "./example-jsons/responses/on_confirm.yaml" description: TODO responses: '200': @@ -742,29 +763,31 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_status.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_status - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - $ref: '#/components/schemas/Order' + allOf: + - properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + error: + $ref: '#/components/schemas/Error' + message: + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + type: object required: - - order + - context type: object - required: - - context - type: object + - $ref: "./example-rules/responses/on_status/on_status.yaml" + examples: + $ref: "./example-jsons/responses/on_status.yaml" description: TODO responses: '200': @@ -793,30 +816,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_update.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_update - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' + - $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: - - order + - context type: object - required: - - context - type: object + - $ref: "./example-rules/responses/on_update/on_update.yaml" + examples: + $ref: "./example-jsons/responses/on_update.yaml" description: TODO responses: '200': @@ -845,31 +870,33 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_rating.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_rating - error: - $ref: '#/components/schemas/Error' - message: - properties: - feedback_form: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/XInput' - description: A feedback form to allow the user to provide additional - information on the rating provided + - $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 - required: - - context - - message - type: object + - $ref: "./example-rules/responses/on_rating/on_rating.yaml" + examples: + $ref: "./example-jsons/responses/on_rating.yaml" description: TODO responses: '200': @@ -898,27 +925,29 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_support.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_support - error: - $ref: '#/components/schemas/Error' - message: - properties: - support: - $ref: '#/components/schemas/Support' + 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 - required: - - context - type: object + - $ref: "./example-rules/responses/on_support/on_support.yaml" + examples: + $ref: "./example-jsons/responses/on_support.yaml" description: TODO responses: '200': @@ -947,29 +976,31 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_track.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_track - error: - $ref: '#/components/schemas/Error' - message: - properties: - tracking: - $ref: '#/components/schemas/Tracking' + 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: - - tracking + - context type: object - required: - - context - type: object + - $ref: "./example-rules/responses/on_track/on_track.yaml" + examples: + $ref: "./example-jsons/responses/on_track.yaml" description: TODO responses: '200': @@ -999,30 +1030,32 @@ paths: requestBody: content: application/json: - examples: - $ref: "./example-jsons/responses/on_cancel.yaml" schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_cancel - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: + allOf: + - properties: + context: allOf: - - $ref: '#/components/schemas/Order' + - $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: - - order + - context type: object - required: - - context - type: object + - $ref: "./example-rules/responses/on_cancel/on_cancel.yaml" + examples: + $ref: "./example-jsons/responses/on_cancel.yaml" description: TODO responses: '200': @@ -1635,7 +1668,6 @@ components: of an order. items: $ref: '#/components/schemas/Stop' - minItems: 2 type: array tags: items: @@ -1655,26 +1687,13 @@ components: type: string vehicle: $ref: '#/components/schemas/Vehicle' - required: - - stops type: object FulfillmentState: additionalProperties: false description: Describes the state of fulfillment properties: descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - - properties: - code: - enum: - - DRIVER_EN_ROUTE_TO_PICKUP - - DRIVER_AT_PICKUP - - RIDE_STARTED - - RIDE_ENDED - - RIDE_CANCELLED - - PAYMENT_COLLECTED - type: string + $ref: '#/components/schemas/Descriptor' updated_at: format: date-time type: string @@ -1783,8 +1802,6 @@ components: items: $ref: '#/components/schemas/TagGroup' type: array - required: - - fulfillment type: object Item: additionalProperties: false @@ -2123,7 +2140,6 @@ components: description: The fulfillments involved in completing this order items: $ref: '#/components/schemas/Fulfillment' - minItems: 1 type: array id: description: Human-readable ID of the order. This is generated at the BPP @@ -2134,7 +2150,6 @@ components: description: The items purchased / availed in this order items: $ref: '#/components/schemas/Item' - minItems: 1 type: array offers: description: The offers applied in this order @@ -2250,10 +2265,6 @@ components: it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly. - enum: - - DRIVER - - DRIVER_APP - - RIDER_APP type: string id: description: ID of the payment term that can be referred at an item or an @@ -2281,14 +2292,8 @@ components: type: string virtual_payment_address: type: string - required: - - amount - - currency type: object status: - enum: - - PAID - - NOT-PAID type: string tags: items: @@ -2297,11 +2302,6 @@ components: time: $ref: '#/components/schemas/Time' type: - enum: - - PRE-ORDER - - PRE-FULFILLMENT - - ON-FULFILLMENT - - POST-FULFILLMENT type: string url: description: A payment url to be called by the BAP. If empty, then the payment @@ -2311,10 +2311,6 @@ components: ```$amount``` are mandatory. format: uri type: string - required: - - collected_by - - type - - status type: object Person: additionalProperties: false @@ -2403,7 +2399,6 @@ components: categories: items: $ref: '#/components/schemas/Category' - minItems: 1 type: array category_id: description: Category Id of the provider at the BPP-level catalog @@ -2424,7 +2419,6 @@ components: items: items: $ref: '#/components/schemas/Item' - minItems: 1 type: array locations: items: @@ -2467,22 +2461,10 @@ components: item: $ref: '#/components/schemas/Item' price: - allOf: - - $ref: '#/components/schemas/Price' - required: - - value + $ref: '#/components/schemas/Price' title: - enum: - - BASE FARE - - TAX - - DISCOUNT - - WAITING CHARGE type: string - required: - - title - - price type: object - minItems: 1 type: array id: description: ID of the quote. @@ -2492,15 +2474,8 @@ components: allOf: - $ref: '#/components/schemas/Price' description: The total quoted price - required: - - currency - - value ttl: $ref: '#/components/schemas/Duration' - required: - - price - - breakup - - ttl type: object Rating: additionalProperties: false @@ -2511,10 +2486,6 @@ components: type: string rating_category: description: Category of the entity being rated - enum: - - RIDE - - DRIVER - - SERVICE type: string value: description: Rating value given to the object. This can be a single value @@ -2522,10 +2493,6 @@ components: can also contain an inequality expression containing logical operators like && and ||. type: string - required: - - rating_category - - id - - value type: object Region: additionalProperties: false @@ -2585,8 +2552,6 @@ components: description: Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement - required: - - replace_within type: object ReturnTerm: additionalProperties: false @@ -2594,9 +2559,6 @@ components: properties: fulfillment_managed_by: description: The entity that will perform the return - enum: - - CONSUMER - - PROVIDER type: string fulfillment_state: allOf: @@ -2616,8 +2578,6 @@ components: description: Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund. - required: - - return_time type: object Scalar: additionalProperties: false @@ -2729,8 +2689,6 @@ components: url: format: uri type: string - required: - - ref_id type: object Tag: additionalProperties: false From fd5502b7f6df2364d9f2f150ca9702d72edd8246 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 18 Jul 2024 18:49:24 +0530 Subject: [PATCH 09/12] final l2 with basic rules, new directory structure --- ...l => mobility_ondemandride_1.1.0_3.0.yaml} | 0 ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 7253 ----------------- ... => mobility_transitticket_1.1.0_3.0.yaml} | 0 api/l2-config/{option1 => version3.1}/README | 0 .../example-jsons/requests/cancel.yaml | 0 .../example-jsons/requests/confirm.yaml | 0 .../example-jsons/requests/init.yaml | 0 .../example-jsons/requests/rating.yaml | 0 .../example-jsons/requests/search.yaml | 0 .../example-jsons/requests/select.yaml | 0 .../example-jsons/requests/status.yaml | 0 .../example-jsons/requests/support.yaml | 0 .../example-jsons/requests/track.yaml | 0 .../example-jsons/requests/update.yaml | 0 .../example-jsons/responses/on_cancel.yaml | 0 .../example-jsons/responses/on_confirm.yaml | 0 .../example-jsons/responses/on_init.yaml | 0 .../example-jsons/responses/on_rating.yaml | 0 .../example-jsons/responses/on_search.yaml | 0 .../example-jsons/responses/on_select.yaml | 0 .../example-jsons/responses/on_status.yaml | 0 .../example-jsons/responses/on_support.yaml | 0 .../example-jsons/responses/on_track.yaml | 0 .../example-jsons/responses/on_update.yaml | 0 .../example-rules/english_rules.yaml | 0 .../example-rules/gpt_feed.yaml | 0 .../example-rules/requests/cancel/cancel.yaml | 0 .../requests/cancel/core_rules.yaml | 0 .../requests/confirm/confirm.yaml | 0 .../requests/confirm/core_rules.yaml | 0 .../requests/init/core_rules.yaml | 0 .../example-rules/requests/init/init.yaml | 0 .../requests/rating/core_rules.yaml | 0 .../example-rules/requests/rating/rating.yaml | 0 .../requests/search/core_rules.yaml | 0 .../example-rules/requests/search/search.yaml | 0 .../requests/select/core_rules.yaml | 0 .../example-rules/requests/select/select.yaml | 0 .../requests/status/core_rules.yaml | 0 .../example-rules/requests/status/status.yaml | 0 .../requests/support/core_rules.yaml | 0 .../requests/support/support.yaml | 0 .../requests/track/core_rules.yaml | 0 .../example-rules/requests/track/track.yaml | 0 .../requests/update/core_rules.yaml | 0 .../example-rules/requests/update/update.yaml | 0 .../responses/on_cancel/core_rules.yaml | 0 .../responses/on_cancel/on_cancel.yaml | 0 .../responses/on_confirm/core_rule_1.yaml | 0 .../responses/on_confirm/on_confirm.yaml | 0 .../responses/on_init/core_rules.yaml | 0 .../responses/on_init/on_init.yaml | 0 .../responses/on_rating/core_rules.yaml | 0 .../responses/on_rating/on_rating.yaml | 0 .../responses/on_search/core_rules.yaml | 0 .../responses/on_search/on_search.yaml | 0 .../responses/on_select/core_rules.yaml | 0 .../responses/on_select/on_select.yaml | 0 .../responses/on_status/core_rules.yaml | 0 .../responses/on_status/on_status.yaml | 0 .../responses/on_support/core_rules.yaml | 0 .../responses/on_support/on_support.yaml | 0 .../responses/on_track/core_rules.yaml | 0 .../responses/on_track/on_track.yaml | 0 .../responses/on_update/core_rules.yaml | 0 .../responses/on_update/on_update.yaml | 0 .../example-rules/shared-rules/bap_order.yaml | 0 .../shared-rules/fulfillments_rule.yaml | 0 .../shared-rules/items_rule.yaml | 0 .../shared-rules/payment_rule.yaml | 0 .../shared-rules/provider_rule.yaml | 0 .../shared-rules/quote_rule.yaml | 0 .../{option1 => version3.1}/final.yaml | 0 ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 0 74 files changed, 7253 deletions(-) rename api/l2-config/{mobility_ondemandride_1.1.0.yaml => mobility_ondemandride_1.1.0_3.0.yaml} (100%) delete mode 100644 api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml rename api/l2-config/{mobility_transitticket_1.1.0.yaml => mobility_transitticket_1.1.0_3.0.yaml} (100%) rename api/l2-config/{option1 => version3.1}/README (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/cancel.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/confirm.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/init.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/rating.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/search.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/select.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/status.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/support.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/track.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/requests/update.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_cancel.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_confirm.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_init.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_rating.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_search.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_select.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_status.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_support.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_track.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-jsons/responses/on_update.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/english_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/gpt_feed.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/cancel/cancel.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/cancel/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/confirm/confirm.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/confirm/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/init/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/init/init.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/rating/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/rating/rating.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/search/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/search/search.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/select/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/select/select.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/status/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/status/status.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/support/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/support/support.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/track/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/track/track.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/update/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/requests/update/update.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_cancel/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_cancel/on_cancel.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_confirm/core_rule_1.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_confirm/on_confirm.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_init/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_init/on_init.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_rating/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_rating/on_rating.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_search/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_search/on_search.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_select/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_select/on_select.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_status/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_status/on_status.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_support/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_support/on_support.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_track/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_track/on_track.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_update/core_rules.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/responses/on_update/on_update.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/bap_order.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/fulfillments_rule.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/items_rule.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/payment_rule.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/provider_rule.yaml (100%) rename api/l2-config/{option1 => version3.1}/example-rules/shared-rules/quote_rule.yaml (100%) rename api/l2-config/{option1 => version3.1}/final.yaml (100%) rename api/l2-config/{option1 => version3.1}/mobility_ondemandride_1.1.0_openapi_3.1.yaml (100%) diff --git a/api/l2-config/mobility_ondemandride_1.1.0.yaml b/api/l2-config/mobility_ondemandride_1.1.0_3.0.yaml similarity index 100% rename from api/l2-config/mobility_ondemandride_1.1.0.yaml rename to api/l2-config/mobility_ondemandride_1.1.0_3.0.yaml diff --git a/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml deleted file mode 100644 index b9de670..0000000 --- a/api/l2-config/mobility_ondemandride_1.1.0_openapi_3.1.yaml +++ /dev/null @@ -1,7253 +0,0 @@ -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: [] -paths: - /search: - post: - description: Search for services by intent - requestBody: - content: - application/json: - examples: - 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 - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - search - message: - properties: - intent: - $ref: '#/components/schemas/Intent' - type: object - required: - - context - - message - type: object - description: BAP searches for services - 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) - - Beckn Gateway (BG) - /select: - post: - description: Select items from the catalog and build your order - requestBody: - content: - application/json: - 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - select - required: - - bpp_id - - bpp_uri - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BAPOrder' - required: - - order - type: object - required: - - context - - message - type: object - 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) - /init: - post: - description: Initialize an order by providing billing and/or shipping details - requestBody: - content: - application/json: - 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - init - required: - - bpp_id - - bpp_uri - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BAPOrder' - required: - - billing - required: - - order - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - confirm - required: - - bpp_id - - bpp_uri - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BAPOrder' - required: - - billing - - payments - required: - - order - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - status - required: - - bpp_id - - bpp_uri - message: - properties: - order_id: - $ref: '#/components/schemas/Order/properties/id' - required: - - order_id - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - schema: - 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 - 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 - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - rating - required: - - bpp_id - - bpp_uri - message: - properties: - ratings: - items: - $ref: '#/components/schemas/Rating' - minItems: 1 - type: array - type: object - required: - - context - - message - type: object - 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) - /support: - post: - description: Contact support - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - support - required: - - bpp_id - - bpp_uri - message: - properties: - support: - $ref: '#/components/schemas/Support' - required: - - ref_id - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - track - required: - - bpp_id - - bpp_uri - message: - additionalProperties: false - properties: - callback_url: - format: uri - type: string - order_id: - $ref: '#/components/schemas/Order/properties/id' - required: - - order_id - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - cancel - required: - - bpp_id - - bpp_uri - message: - properties: - cancellation_reason_id: - $ref: '#/components/schemas/Option/properties/id' - descriptor: - $ref: '#/components/schemas/Descriptor' - order_id: - $ref: '#/components/schemas/Order/properties/id' - required: - - order_id - type: object - required: - - context - - message - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_search - required: - - action - error: - $ref: '#/components/schemas/Error' - message: - properties: - catalog: - $ref: '#/components/schemas/Catalog' - required: - - catalog - type: object - required: - - context - type: object - 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: - - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_select - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - not: - required: - - id - required: - - quote - required: - - order - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_init - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - not: - required: - - id - required: - - quote - - billing - - payments - required: - - order - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_confirm - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - state - - agent - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_status - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_update - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - required: - - order - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_rating - required: - - bpp_id - - bpp_uri - 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 - type: object - 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 - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_support - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - support: - allOf: - - $ref: '#/components/schemas/Support' - - anyOf: - - required: - - phone - - required: - - email - - required: - - url - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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 - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_track - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - tracking: - $ref: '#/components/schemas/Tracking' - required: - - tracking - type: object - required: - - context - type: object - 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 - requestBody: - content: - application/json: - 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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: "\u20B9 30 upto 2 km" - - descriptor: - name: Rate above Min. Fare - display: true - value: "\u20B915 / km" - - descriptor: - name: Driver Pickup Charges - display: true - value: "\u20B9 10" - - descriptor: - name: Nominal Fare - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 10" - - descriptor: - name: Waiting Charges - short_desc: Driver may quote extra to cover for traffic, - chance of return trip, etc. - display: true - value: "\u20B9 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' - schema: - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_cancel - required: - - bpp_id - - bpp_uri - error: - $ref: '#/components/schemas/Error' - message: - properties: - order: - allOf: - - $ref: '#/components/schemas/BPPOrder' - - properties: - fulfillments: - items: - allOf: - - properties: - state: - allOf: - - properties: - descriptor: - required: - - code - required: - - descriptor - required: - - state - type: array - required: - - quote - - billing - - payments - - id - - cancellation - required: - - order - type: object - required: - - context - type: object - 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 - BAPOrder: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - allOf: - - $ref: '#/components/schemas/Fulfillment' - required: - - id - minItems: 1 - type: array - items: - items: - allOf: - - $ref: '#/components/schemas/Item' - required: - - id - minItems: 1 - type: array - provider: - allOf: - - $ref: '#/components/schemas/Provider' - required: - - id - description: Describes the order details from the perspective of the BAP. Contains - the order details sent from a BAP to BPP. - required: - - provider - - items - - fulfillments - BPPOrder: - allOf: - - $ref: '#/components/schemas/Order' - - properties: - fulfillments: - items: - required: - - id - - type - type: array - items: - items: - allOf: - - $ref: '#/components/schemas/Item' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - - properties: - images: - items: - $ref: '#/components/schemas/Image' - minItems: 1 - type: array - required: - - name - - images - - short_desc - price: - allOf: - - $ref: '#/components/schemas/Price' - required: - - currency - - value - required: - - id - - descriptor - - price - type: array - provider: - allOf: - - $ref: '#/components/schemas/Provider' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - - properties: - images: - items: - $ref: '#/components/schemas/Image' - minItems: 1 - type: array - required: - - name - - images - - short_desc - required: - - id - - descriptor - description: Describes the order details from the perspective of the BPP. Contains - the order details sent from a BPP to BAP. - required: - - provider - - items - - fulfillments - 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: - enum: - - CONSUMER - - PROVIDER - 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 - required: - - time - - cancelled_by - 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: - - cancel_by - - 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.
  • This is typically - used in the discovery stage when the BPP sends the details of the products - and services it offers as response to a search intent from the BAP.
- properties: - descriptor: - $ref: '#/components/schemas/Descriptor' - exp: - description: Timestamp after which catalog will expire - format: date-time - type: string - fulfillments: - description: Fulfillment modes offered at the BPP level. This is used when - a BPP itself offers fulfillments on behalf of the providers it has onboarded. - items: - $ref: '#/components/schemas/Fulfillment' - minItems: 1 - type: array - offers: - description: Offers at the BPP-level. This is common across all providers - onboarded by the BPP. - items: - $ref: '#/components/schemas/Offer' - type: array - payments: - description: Payment terms offered by the BPP for all transactions. This - can be overriden at the provider level. - items: - $ref: '#/components/schemas/Payment' - type: array - providers: - items: - allOf: - - $ref: '#/components/schemas/Provider' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - items: - items: - allOf: - - $ref: '#/components/schemas/Item' - - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - required: - - name - required: - - descriptor - - price - - category_ids - - fulfillment_ids - type: array - required: - - id - - categories - - descriptor - - items - minItems: 1 - type: array - ttl: - description: Duration in seconds after which this catalog will expire - type: string - required: - - providers - type: object - Category: - additionalProperties: false - description: A label under which a collection of items can be grouped. - properties: - descriptor: - $ref: '#/components/schemas/Descriptor' - id: - description: ID of the category - type: string - parent_category_id: - $ref: '#/components/schemas/Category/properties/id' - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - time: - $ref: '#/components/schemas/Time' - ttl: - description: Time to live for an instance of this schema - type: object - Circle: - additionalProperties: false - description: Describes a circular region of a specified radius centered at a - specified GPS coordinate. - properties: - gps: - $ref: '#/components/schemas/Gps' - radius: - $ref: '#/components/schemas/Scalar' - type: object - City: - additionalProperties: false - description: Describes a city - properties: - code: - description: City code - type: string - name: - description: Name of the city - type: string - type: object - Contact: - additionalProperties: false - properties: - email: - type: string - jcard: - description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification - type: object - phone: - type: string - type: object - Context: - additionalProperties: false - description: Every API call in beckn protocol has a context. It provides a high-level - overview to the receiver about the nature of the intended transaction. Typically, - it is the BAP that sets the transaction context based on the consumer's location - and action on their UI. But sometimes, during unsolicited callbacks, the BPP - also sets the transaction context but it is usually the same as the context - of a previous full-cycle, request-callback interaction between the BAP and - the BPP. The context object contains four types of fields.
  1. Demographic - information about the transaction using fields like `domain`, `country`, and - `region`.
  2. Addressing details like the sending and receiving platform's - ID and API URL.
  3. Interoperability information like the protocol version - that implemented by the sender and,
  4. Transaction details like the method - being called at the receiver's endpoint, the transaction_id that represents - an end-to-end user session at the BAP, a message ID to pair requests with - callbacks, a timestamp to capture sending times, a ttl to specifiy the validity - of the request, and a key to encrypt information if necessary.
This - object must be passed in every interaction between a BAP and a BPP. In HTTP/S - implementations, it is not necessary to send the context during the synchronous - response. However, in asynchronous protocols, the context must be sent during - all interactions, - properties: - action: - description: The Beckn protocol method being called by the sender and executed - at the receiver. - type: string - bap_id: - allOf: - - description: A globally unique identifier of the platform, Typically it - is the fully qualified domain name (FQDN) of the platform. - type: string - - not: - format: uri - description: Subscriber ID of the BAP - bap_uri: - allOf: - - description: The callback URL of the Subscriber. This should necessarily - contain the same domain name as set in `subscriber_id``. - format: uri - type: string - description: Subscriber URL of the BAP for accepting callbacks from BPPs. - bpp_id: - allOf: - - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' - description: Subscriber ID of the BPP - bpp_uri: - allOf: - - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' - description: Subscriber URL of the BPP for accepting calls from BAPs. - domain: - allOf: - - $ref: '#/components/schemas/Domain/properties/code' - description: Domain code that is relevant to this transaction context - key: - description: The encryption public key of the sender - type: string - location: - allOf: - - $ref: '#/components/schemas/Location' - description: The location where the transaction is intended to be fulfilled. - required: - - country - - city - message_id: - description: This is a unique value which persists during a request / callback - cycle. Since beckn protocol APIs are asynchronous, BAPs need a common - value to match an incoming callback from a BPP to an earlier call. This - value can also be used to ignore duplicate messages coming from the BPP. - It is recommended to generate a fresh message_id for every new interaction. - When sending unsolicited callbacks, BPPs must generate a new message_id. - format: uuid - type: string - timestamp: - description: Time of request generation in RFC3339 format - format: date-time - type: string - transaction_id: - description: This is a unique value which persists across all API calls - from `search` through `confirm`. This is done to indicate an active user - session across multiple requests. The BPPs can use this value to push - personalized recommendations, and dynamic offerings related to an ongoing - transaction despite being unaware of the user active on the BAP. - format: uuid - type: string - ttl: - description: The duration in ISO8601 format after timestamp for which this - message holds valid - type: string - version: - description: Version of transaction protocol being used by the sender. - type: string - required: - - action - - domain - - version - - bap_id - - bap_uri - - transaction_id - - message_id - type: object - Country: - additionalProperties: false - description: Describes a country. - properties: - code: - description: Country code as per ISO 3166-1 and ISO 3166-2 format - type: string - name: - description: Name of the country - type: string - type: object - Credential: - additionalProperties: false - description: Describes a credential of an entity - Person or Organization - properties: - id: - type: string - type: - default: VerifiableCredential - type: string - url: - description: URL of the credential - format: uri - type: string - type: object - Customer: - additionalProperties: false - description: Describes a customer buying/availing a product or a service - properties: - contact: - $ref: '#/components/schemas/Contact' - person: - $ref: '#/components/schemas/Person' - type: object - DecimalValue: - description: Describes a decimal value - pattern: '[+-]?([0-9]*[.])?[0-9]+' - type: string - Descriptor: - additionalProperties: false - description: Physical description of something. - properties: - additional_desc: - properties: - content_type: - enum: - - text/plain - - text/html - - application/json - type: string - url: - type: string - type: object - code: - type: string - images: - items: - $ref: '#/components/schemas/Image' - type: array - long_desc: - type: string - media: - items: - $ref: '#/components/schemas/MediaFile' - type: array - name: - type: string - short_desc: - type: string - type: object - Domain: - additionalProperties: false - description: Described the industry sector or sub-sector. The network policy - should contain codes for all the industry sectors supported by the network. - Domains can be created in varying levels of granularity. The granularity of - a domain can be decided by the participants of the network. Too broad domains - will result in irrelevant search broadcast calls to BPPs that don't have services - supporting the domain. Too narrow domains will result in a large number of - registry entries for each BPP. It is recommended that network facilitators - actively collaborate with various working groups and network participants - to carefully choose domain codes keeping in mind relevance, performance, and - opportunity cost. It is recommended that networks choose broad domains like - mobility, logistics, healthcare etc, and progressively granularize them as - and when the number of network participants for each domain grows large. - properties: - additional_info: - allOf: - - $ref: '#/components/schemas/MediaFile' - description: A url that contains addtional information about that domain. - code: - description: Standard code representing the domain. The standard is usually - published as part of the network policy. Furthermore, the network facilitator - should also provide a mechanism to provide the supported domains of a - network. - enum: - - mobility:ondemandride - type: string - name: - description: Name of the domain - type: string - type: object - Duration: - description: Describes duration as per ISO8601 format - type: string - Error: - additionalProperties: false - description: Describes an error object that is returned by a BAP, BPP or BG - as a response or callback to an action by another network participant. This - object is sent when any request received by a network participant is unacceptable. - This object can be sent either during Ack or with the callback. - properties: - code: - description: Standard error code. For full list of error codes, refer to - docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo" - type: string - message: - description: Human readable message describing the error. Used mainly for - logging. Not recommended to be shown to the user. - type: string - paths: - description: Path to json schema generating the error. Used only during - json schema validation errors - type: string - type: object - Fee: - additionalProperties: false - description: A fee applied on a particular entity - properties: - amount: - allOf: - - $ref: '#/components/schemas/Price' - description: A fixed value - percentage: - allOf: - - $ref: '#/components/schemas/DecimalValue' - description: Percentage of a value - type: object - Form: - additionalProperties: false - description: Describes a form - properties: - data: - additionalProperties: - type: string - description: The form submission data - type: object - mime_type: - description: This field indicates the nature and format of the form received - by querying the url. MIME types are defined and standardized in IETF's - RFC 6838. - enum: - - text/html - - application/xml - type: string - submission_id: - format: uuid - type: string - url: - description: The URL from where the form can be fetched. The content fetched - from the url must be processed as per the mime_type specified in this - object. Once fetched, the rendering platform can choosed to render the - form as-is as an embeddable element; or process it further to blend with - the theme of the application. In case the interface is non-visual, the - the render can process the form data and reproduce it as per the standard - specified in the form. - format: uri - type: string - type: object - Fulfillment: - additionalProperties: false - description: Describes how a an order will be rendered/fulfilled to the end-customer - properties: - agent: - allOf: - - $ref: '#/components/schemas/Agent' - description: The agent that is currently handling the fulfillment of the - order - contact: - $ref: '#/components/schemas/Contact' - customer: - allOf: - - $ref: '#/components/schemas/Customer' - description: The person that will ultimately receive the order - id: - description: Unique reference ID to the fulfillment of an order - type: string - path: - description: The physical path taken by the agent that can be rendered on - a map. The allowed format of this property can be set by the network. - type: string - rateable: - description: Whether the fulfillment can be rated or not - type: boolean - rating: - allOf: - - $ref: '#/components/schemas/Rating/properties/value' - description: The rating value of the fulfullment service. - state: - allOf: - - $ref: '#/components/schemas/FulfillmentState' - description: The current state of fulfillment. The BPP must set this value - whenever the state of the order fulfillment changes and fire an unsolicited - `on_status` call. - stops: - description: The list of logical stops encountered during the fulfillment - of an order. - items: - $ref: '#/components/schemas/Stop' - minItems: 2 - type: array - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - tracking: - default: false - description: Indicates whether the fulfillment allows tracking - type: boolean - type: - description: A code that describes the mode of fulfillment. This is typically - set when there are multiple ways an order can be fulfilled. For example, - a retail order can be fulfilled either via store pickup or a home delivery. - Similarly, a medical consultation can be provided either in-person or - via tele-consultation. The network policy must publish standard fulfillment - type codes for the different modes of fulfillment. - type: string - vehicle: - $ref: '#/components/schemas/Vehicle' - required: - - stops - type: object - FulfillmentState: - additionalProperties: false - description: Describes the state of fulfillment - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - - properties: - code: - enum: - - DRIVER_EN_ROUTE_TO_PICKUP - - DRIVER_AT_PICKUP - - RIDE_STARTED - - RIDE_ENDED - - RIDE_CANCELLED - - PAYMENT_COLLECTED - type: string - updated_at: - format: date-time - type: string - updated_by: - description: ID of entity which changed the state - type: string - type: object - Gps: - description: Describes a gps coordinate - pattern: ^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$ - type: string - Image: - additionalProperties: false - description: Describes an image - properties: - height: - description: Height of the image in pixels - type: string - size_type: - description: The size of the image. The network policy can define the default - dimensions of each type - enum: - - xs - - sm - - md - - lg - - xl - - custom - type: string - url: - description: URL to the image. This can be a data url or an remote url - format: uri - type: string - width: - description: Width of the image in pixels - type: string - required: - - url - type: object - Intent: - additionalProperties: false - description: The intent to buy or avail a product or a service. The BAP can - declare the intent of the consumer containing
  • What they want (A product, - service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where - they want it and where they want it from
  • When they want it (start - and end time of fulfillment
  • How they want to pay for it

This - has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This - is typically used by the BAP to send the purpose of the user's search to the - BPP. This will be used by the BPP to find products or services it offers that - may match the user's intent.
For example, in Mobility, the mobility consumer - declares a mobility intent. In this case, the mobility consumer declares information - that describes various aspects of their journey like,
  • Where would they - like to begin their journey (intent.fulfillment.start.location)
  • Where - would they like to end their journey (intent.fulfillment.end.location)
  • When - would they like to begin their journey (intent.fulfillment.start.time)
  • When - would they like to end their journey (intent.fulfillment.end.time)
  • Who - is the transport service provider they would like to avail services from (intent.provider)
  • Who - is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What - kind of fare product would they like to purchase (intent.item)
  • What - add-on services would they like to avail
  • What offers would they like - to apply on their booking (intent.offer)
  • What category of services - would they like to avail (intent.category)
  • What additional luggage - are they carrying
  • How would they like to pay for their journey (intent.payment)

For - example, in health domain, a consumer declares the intent for a lab booking - the describes various aspects of their booking like,
  • Where would they - like to get their scan/test done (intent.fulfillment.start.location)
  • When - would they like to get their scan/test done (intent.fulfillment.start.time)
  • When - would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who - is the service provider they would like to avail services from (intent.provider)
  • Who - is getting the test/scan (intent.fulfillment.customer)
  • What kind of - test/scan would they like to purchase (intent.item)
  • What category - of services would they like to avail (intent.category)
  • How would they - like to pay for their journey (intent.payment)
- properties: - category: - allOf: - - $ref: '#/components/schemas/Category' - description: Details on the item category - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - description: A raw description of the search intent. Free text search strings, - raw audio, etc can be sent in this object. - fulfillment: - allOf: - - $ref: '#/components/schemas/Fulfillment' - description: Details on how the customer wants their order fulfilled - item: - allOf: - - $ref: '#/components/schemas/Item' - description: Details of the item that the consumer wants to order - offer: - allOf: - - $ref: '#/components/schemas/Offer' - description: details on the offer the customer wants to avail - payment: - allOf: - - $ref: '#/components/schemas/Payment' - description: Details on how the customer wants to pay for the order - provider: - allOf: - - $ref: '#/components/schemas/Provider' - description: The provider from which the customer wants to place to the - order from - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - required: - - fulfillment - type: object - Item: - additionalProperties: false - description: Describes a product or a service offered to the end consumer by - the provider. In the mobility sector, it can represent a fare product like - one way journey. In the logistics sector, it can represent the delivery service - offering. In the retail domain it can represent a product like a grocery item. - properties: - add_ons: - items: - $ref: '#/components/schemas/AddOn' - type: array - cancellation_terms: - description: Cancellation terms of this item - items: - $ref: '#/components/schemas/CancellationTerm' - type: array - category_ids: - description: Categories this item can be listed under - items: - allOf: - - $ref: '#/components/schemas/Category/properties/id' - type: array - creator: - allOf: - - $ref: '#/components/schemas/Organization' - description: The creator of this item - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - description: Physical description of the item - fulfillment_ids: - description: Modes through which this item can be fulfilled - items: - allOf: - - $ref: '#/components/schemas/Fulfillment/properties/id' - type: array - id: - description: ID of the item. - type: string - location_ids: - description: Provider Locations this item is available in - items: - allOf: - - $ref: '#/components/schemas/Location/properties/id' - type: array - matched: - description: Whether this item is an exact match of the request - type: boolean - parent_item_id: - allOf: - - $ref: '#/components/schemas/Item/properties/id' - description: ID of the item, this item is a variant of - parent_item_quantity: - allOf: - - $ref: '#/components/schemas/ItemQuantity' - description: The number of units of the parent item this item is a multiple - of - payment_ids: - description: Payment modalities through which this item can be ordered - items: - allOf: - - $ref: '#/components/schemas/Payment/properties/id' - type: array - price: - allOf: - - $ref: '#/components/schemas/Price' - description: The price of this item, if it has intrinsic value - quantity: - allOf: - - $ref: '#/components/schemas/ItemQuantity' - description: The selling quantity of the item - rateable: - description: Whether this item can be rated - type: boolean - rating: - allOf: - - $ref: '#/components/schemas/Rating/properties/value' - description: The rating of the item - recommended: - description: Whether this item is a recommended item to a response - type: boolean - refund_terms: - description: Refund terms of this item - items: - description: Refund term of an item or an order - properties: - fulfillment_state: - allOf: - - $ref: '#/components/schemas/State' - description: The state of fulfillment during which this term is applicable. - refund_amount: - $ref: '#/components/schemas/Price' - refund_eligible: - description: Indicates if cancellation will result in a refund - type: boolean - refund_within: - allOf: - - $ref: '#/components/schemas/Time' - description: Time within which refund will be processed after successful - cancellation. - type: object - type: array - related: - description: Whether this item is a related item to the exactly matched - item - type: boolean - replacement_terms: - description: Terms that are applicable be met when this item is replaced - items: - $ref: '#/components/schemas/ReplacementTerm' - type: array - return_terms: - description: Terms that are applicable when this item is returned - items: - $ref: '#/components/schemas/ReturnTerm' - type: array - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - time: - allOf: - - $ref: '#/components/schemas/Time' - description: Temporal attributes of this item. This property is used when - the item exists on the catalog only for a limited period of time. - ttl: - description: Time to live in seconds for an instance of this schema - type: string - xinput: - allOf: - - $ref: '#/components/schemas/XInput' - description: Additional input required from the customer to purchase / avail - this item - type: object - ItemQuantity: - additionalProperties: false - description: Describes the count or amount of an item - properties: - allocated: - description: This represents the exact quantity allocated for purchase of - the item. - properties: - count: - minimum: 0 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - available: - description: This represents the exact quantity available for purchase of - the item. The buyer can only purchase multiples of this - properties: - count: - minimum: 0 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - maximum: - description: This represents the maximum quantity allowed for purchase of - the item - properties: - count: - minimum: 1 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - minimum: - description: This represents the minimum quantity allowed for purchase of - the item - properties: - count: - minimum: 0 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - selected: - description: This represents the quantity selected for purchase of the item - properties: - count: - minimum: 0 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - unitized: - description: This represents the quantity available in a single unit of - the item - properties: - count: - maximum: 1 - minimum: 1 - type: integer - measure: - $ref: '#/components/schemas/Scalar' - type: object - type: object - Location: - additionalProperties: false - description: The physical location of something - properties: - 3dspace: - description: The three dimensional region describing this location - type: string - address: - allOf: - - $ref: '#/components/schemas/Address' - description: The address of this location. - area_code: - type: string - circle: - $ref: '#/components/schemas/Circle' - city: - allOf: - - $ref: '#/components/schemas/City' - description: The city this location is, or is located within - country: - allOf: - - $ref: '#/components/schemas/Country' - description: The country this location is, or is located within - descriptor: - $ref: '#/components/schemas/Descriptor' - district: - description: The state this location is, or is located within - type: string - gps: - allOf: - - $ref: '#/components/schemas/Gps' - description: The GPS co-ordinates of this location. - id: - type: string - map_url: - description: The url to the map of the location. This can be a globally - recognized map url or the one specified by the network policy. - format: uri - type: string - polygon: - description: The boundary polygon of this location - type: string - rating: - allOf: - - $ref: '#/components/schemas/Rating/properties/value' - description: The rating of this location - state: - allOf: - - $ref: '#/components/schemas/State' - description: The state this location is, or is located within - type: object - MediaFile: - additionalProperties: false - description: This object contains a url to a media file. - properties: - dsa: - description: The signing algorithm used by the sender - type: string - mimetype: - description: indicates the nature and format of the document, file, or assortment - of bytes. MIME types are defined and standardized in IETF's RFC 6838 - type: string - signature: - description: The digital signature of the file signed by the sender - type: string - url: - description: The URL of the file - format: uri - type: string - type: object - Offer: - additionalProperties: false - description: An offer associated with a catalog. This is typically used to promote - a particular product and enable more purchases. - properties: - category_ids: - items: - $ref: '#/components/schemas/Category/properties/id' - type: array - descriptor: - $ref: '#/components/schemas/Descriptor' - id: - type: string - item_ids: - items: - $ref: '#/components/schemas/Item/properties/id' - type: array - location_ids: - items: - $ref: '#/components/schemas/Location/properties/id' - type: array - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - time: - $ref: '#/components/schemas/Time' - type: object - Option: - additionalProperties: false - description: Describes a selectable option - properties: - descriptor: - $ref: '#/components/schemas/Descriptor' - id: - type: string - type: object - Order: - additionalProperties: false - description: Describes a legal purchase order. It contains the complete details - of the legal contract created between the buyer and the seller. - properties: - add_ons: - description: The add-ons purchased / availed in this order - items: - $ref: '#/components/schemas/AddOn' - type: array - billing: - allOf: - - $ref: '#/components/schemas/Billing' - description: The billing details of this order - cancellation: - allOf: - - $ref: '#/components/schemas/Cancellation' - description: The cancellation details of this order - cancellation_terms: - description: Cancellation terms of this item - items: - $ref: '#/components/schemas/CancellationTerm' - type: array - created_at: - description: The date-time of creation of this order - format: date-time - type: string - fulfillments: - description: The fulfillments involved in completing this order - items: - $ref: '#/components/schemas/Fulfillment' - minItems: 1 - type: array - id: - description: Human-readable ID of the order. This is generated at the BPP - layer. The BPP can either generate order id within its system or forward - the order ID created at the provider level. - type: string - items: - description: The items purchased / availed in this order - items: - $ref: '#/components/schemas/Item' - minItems: 1 - type: array - offers: - description: The offers applied in this order - items: - $ref: '#/components/schemas/Offer' - type: array - payments: - description: The terms of settlement for this order - items: - $ref: '#/components/schemas/Payment' - type: array - provider: - allOf: - - $ref: '#/components/schemas/Provider' - description: Details of the provider whose catalog items have been selected. - quote: - allOf: - - $ref: '#/components/schemas/Quotation' - description: The mutually agreed upon quotation for this order. - ref_order_ids: - description: A list of order IDs to link this order to previous orders. - items: - description: ID of a previous order - type: string - type: array - refund_terms: - description: Refund terms of this item - items: - $ref: '#/components/schemas/Item/properties/refund_terms/items' - type: array - replacement_terms: - description: Replacement terms of this item - items: - $ref: '#/components/schemas/ReplacementTerm' - type: array - return_terms: - description: Return terms of this item - items: - $ref: '#/components/schemas/ReturnTerm' - type: array - status: - description: Status of the order. Allowed values can be defined by the network - policy - enum: - - ACTIVE - - COMPLETE - - CANCELLED - type: string - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - type: - default: DEFAULT - description: This is used to indicate the type of order being created to - BPPs. Sometimes orders can be linked to previous orders, like a replacement - order in a retail domain. A follow-up consultation in healthcare domain. - A single order part of a subscription order. The list of order types can - be standardized at the network level. - enum: - - DRAFT - - DEFAULT - type: string - updated_at: - description: The date-time of updated of this order - format: date-time - type: string - xinput: - allOf: - - $ref: '#/components/schemas/XInput' - description: Additional input required from the customer to confirm this - order - type: object - Organization: - additionalProperties: false - description: An organization. Usually a recognized business entity. - properties: - address: - allOf: - - $ref: '#/components/schemas/Address' - description: The postal address of the organization - city: - allOf: - - $ref: '#/components/schemas/City' - description: The city where the the organization's address is registered - contact: - $ref: '#/components/schemas/Contact' - descriptor: - $ref: '#/components/schemas/Descriptor' - state: - allOf: - - $ref: '#/components/schemas/State' - description: The state where the organization's address is registered - type: object - Payment: - additionalProperties: false - description: Describes the terms of settlement between the BAP and the BPP for - a single transaction. When instantiated, this object contains
  1. the - amount that has to be settled,
  2. The payment destination destination - details
  3. When the settlement should happen, and
  4. A transaction - reference ID
. During a transaction, the BPP reserves the right to - decide the terms of payment. However, the BAP can send its terms to the BPP - first. If the BPP does not agree to those terms, it must overwrite the terms - and return them to the BAP. If overridden, the BAP must either agree to the - terms sent by the BPP in order to preserve the provider's autonomy, or abort - the transaction. In case of such disagreements, the BAP and the BPP can perform - offline negotiations on the payment terms. Once an agreement is reached, the - BAP and BPP can resume transactions. - properties: - collected_by: - description: This field indicates who is the collector of payment. The BAP - can set this value to 'bap' if it wants to collect the payment first and settle - it to the BPP. If the BPP agrees to those terms, the BPP should not send - the payment url. Alternatively, the BPP can set this field with the value - 'bpp' if it wants the payment to be made directly. - enum: - - DRIVER - - DRIVER_APP - - RIDER_APP - type: string - id: - description: ID of the payment term that can be referred at an item or an - order level in a catalog - type: string - params: - properties: - amount: - type: string - bank_account_number: - type: string - bank_code: - type: string - currency: - type: string - source_bank_account_number: - type: string - source_bank_code: - type: string - source_virtual_payment_address: - type: string - transaction_id: - description: The reference transaction ID associated with a payment - activity - type: string - virtual_payment_address: - type: string - required: - - amount - - currency - type: object - status: - enum: - - PAID - - NOT-PAID - type: string - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - time: - $ref: '#/components/schemas/Time' - type: - enum: - - PRE-ORDER - - PRE-FULFILLMENT - - ON-FULFILLMENT - - POST-FULFILLMENT - type: string - url: - description: A payment url to be called by the BAP. If empty, then the payment - is to be done offline. The details of payment should be present in the - params object. If tl_method = http/get, then the payment details will - be sent as url params. Two url param values, ```$transaction_id``` and - ```$amount``` are mandatory. - format: uri - type: string - required: - - collected_by - - type - - status - type: object - Person: - additionalProperties: false - description: Describes a person as any individual - properties: - age: - allOf: - - $ref: '#/components/schemas/Duration' - description: Age of the person - creds: - items: - $ref: '#/components/schemas/Credential' - type: array - dob: - description: Date of birth of the person - format: date - type: string - gender: - description: Gender of something, typically a Person, but possibly also - fictional characters, animals, etc. While Male and Female may be used, - text strings are also acceptable for people who do not identify as a binary - gender.Allowed values for this field can be published in the network policy - type: string - id: - description: Describes the identity of the person - type: string - image: - $ref: '#/components/schemas/Image' - languages: - items: - description: Describes a language known to the person. - properties: - code: - type: string - name: - type: string - type: object - type: array - name: - description: the name of the person - type: string - skills: - items: - description: Describes a skill of the person. - properties: - code: - type: string - name: - type: string - type: object - type: array - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - url: - description: Profile url of the person - format: uri - type: string - type: object - Price: - additionalProperties: false - description: Describes the price of an item. Allows for domain extension. - properties: - computed_value: - $ref: '#/components/schemas/DecimalValue' - currency: - type: string - estimated_value: - $ref: '#/components/schemas/DecimalValue' - listed_value: - $ref: '#/components/schemas/DecimalValue' - maximum_value: - $ref: '#/components/schemas/DecimalValue' - minimum_value: - $ref: '#/components/schemas/DecimalValue' - offered_value: - $ref: '#/components/schemas/DecimalValue' - value: - $ref: '#/components/schemas/DecimalValue' - type: object - Provider: - additionalProperties: false - description: Describes the catalog of a business. - properties: - categories: - items: - $ref: '#/components/schemas/Category' - minItems: 1 - type: array - category_id: - description: Category Id of the provider at the BPP-level catalog - type: string - descriptor: - $ref: '#/components/schemas/Descriptor' - exp: - description: Time after which catalog has to be refreshed - format: date-time - type: string - fulfillments: - items: - $ref: '#/components/schemas/Fulfillment' - type: array - id: - description: Id of the provider - type: string - items: - items: - $ref: '#/components/schemas/Item' - minItems: 1 - type: array - locations: - items: - $ref: '#/components/schemas/Location' - type: array - offers: - items: - $ref: '#/components/schemas/Offer' - type: array - payments: - items: - $ref: '#/components/schemas/Payment' - type: array - rateable: - description: Whether this provider can be rated or not - type: boolean - rating: - $ref: '#/components/schemas/Rating/properties/value' - tags: - items: - $ref: '#/components/schemas/TagGroup' - type: array - time: - $ref: '#/components/schemas/Time' - ttl: - description: The time-to-live in seconds, for this object. This can be overriden - at deeper levels. A value of -1 indicates that this object is not cacheable. - minimum: -1 - type: integer - type: object - Quotation: - additionalProperties: false - description: Describes a quote. It is the estimated price of products or services - from the BPP.
This has properties like price, breakup, ttl - properties: - breakup: - description: the breakup of the total quoted price - items: - properties: - item: - $ref: '#/components/schemas/Item' - price: - allOf: - - $ref: '#/components/schemas/Price' - required: - - currency - - value - title: - enum: - - BASE FARE - - TAX - - DISCOUNT - - WAITING CHARGE - type: string - required: - - title - - price - type: object - minItems: 1 - type: array - id: - description: ID of the quote. - format: uuid - type: string - price: - allOf: - - $ref: '#/components/schemas/Price' - description: The total quoted price - required: - - currency - - value - ttl: - $ref: '#/components/schemas/Duration' - required: - - price - - breakup - - ttl - type: object - Rating: - additionalProperties: false - description: Describes the rating of an entity - properties: - id: - description: Id of the object being rated - type: string - rating_category: - description: Category of the entity being rated - enum: - - RIDE - - DRIVER - - SERVICE - type: string - value: - description: Rating value given to the object. This can be a single value - or can also contain an inequality operator like gt, gte, lt, lte. This - can also contain an inequality expression containing logical operators - like && and ||. - type: string - required: - - rating_category - - id - - value - type: object - Region: - additionalProperties: false - description: Describes an arbitrary region of space. The network policy should - contain a published list of supported regions by the network. - properties: - boundary: - description: A string representing the boundary of the region. One-dimensional - regions are represented by polylines. Two-dimensional regions are represented - by polygons, and three-dimensional regions can represented by polyhedra. - type: string - code: - description: A standard code representing the region. This should be interpreted - in the same way by all network participants. - type: string - dimensions: - description: The number of dimensions that are used to describe any point - inside that region. The most common dimensionality of a region is 2, that - represents an area on a map. There are regions on the map that can be - approximated to one-dimensional regions like roads, railway lines, or - shipping lines. 3 dimensional regions are rarer, but are gaining popularity - as flying drones are being adopted for various fulfillment services. - enum: - - '1' - - '2' - - '3' - type: string - map_url: - description: The url to the map of the region. This can be a globally recognized - map or the one specified by the network policy. - type: string - name: - description: Name of the region as specified on the map where that region - exists. - type: string - type: - description: The type of region. This is used to specify the granularity - of the region represented by this object. Various examples of two-dimensional - region types are city, country, state, district, and so on. The network - policy should contain a list of all possible region types supported by - the network. - type: string - type: object - ReplacementTerm: - additionalProperties: false - description: The replacement policy of an item or an order - properties: - external_ref: - $ref: '#/components/schemas/MediaFile' - fulfillment_state: - allOf: - - $ref: '#/components/schemas/State' - description: The state of fulfillment during which this term is applicable. - replace_within: - allOf: - - $ref: '#/components/schemas/Time' - description: Applicable only for buyer managed returns where the buyer has - to replace the item before a certain date-time, failing which they will - not be eligible for replacement - required: - - replace_within - type: object - ReturnTerm: - additionalProperties: false - description: Describes the return policy of an item or an order - properties: - fulfillment_managed_by: - description: The entity that will perform the return - enum: - - CONSUMER - - PROVIDER - type: string - fulfillment_state: - allOf: - - $ref: '#/components/schemas/State' - description: The state of fulfillment during which this term IETF''s applicable. - return_eligible: - description: Indicates whether the item is eligible for return - type: boolean - return_location: - allOf: - - $ref: '#/components/schemas/Location' - description: The location where the item or order must / will be returned - to - return_time: - allOf: - - $ref: '#/components/schemas/Time' - description: Applicable only for buyer managed returns where the buyer has - to return the item to the origin before a certain date-time, failing which - they will not be eligible for refund. - required: - - return_time - type: object - Scalar: - additionalProperties: false - description: Describes a scalar - properties: - computed_value: - $ref: '#/components/schemas/DecimalValue' - estimated_value: - $ref: '#/components/schemas/DecimalValue' - range: - properties: - max: - $ref: '#/components/schemas/DecimalValue' - min: - $ref: '#/components/schemas/DecimalValue' - type: object - type: - enum: - - CONSTANT - - VARIABLE - type: string - unit: - type: string - value: - $ref: '#/components/schemas/DecimalValue' - type: object - Schedule: - additionalProperties: false - description: Describes a schedule - properties: - frequency: - $ref: '#/components/schemas/Duration' - holidays: - items: - format: date-time - type: string - type: array - times: - items: - format: date-time - type: string - type: array - type: object - State: - additionalProperties: false - description: A bounded geopolitical region of governance inside a country. - properties: - code: - description: State code as per country or international standards - type: string - name: - description: Name of the state - type: string - type: object - Stop: - additionalProperties: false - description: A logical point in space and time during the fulfillment of an - order. - properties: - authorization: - $ref: '#/components/schemas/Authorization' - contact: - allOf: - - $ref: '#/components/schemas/Contact' - description: Contact details of the stop - id: - type: string - instructions: - allOf: - - $ref: '#/components/schemas/Descriptor' - description: Instructions that need to be followed at the stop - location: - allOf: - - $ref: '#/components/schemas/Location' - description: Location of the stop - parent_stop_id: - type: string - person: - allOf: - - $ref: '#/components/schemas/Person' - description: The details of the person present at the stop - time: - allOf: - - $ref: '#/components/schemas/Time' - description: Timings applicable at the stop. - type: - description: The type of stop. Allowed values of this property can be defined - by the network policy. - enum: - - START - - END - type: string - type: object - Support: - additionalProperties: false - description: Details of customer support - properties: - callback_phone: - pattern: ^\+?[1-9]\d{1,14}$ - type: string - email: - format: email - type: string - phone: - pattern: ^\+?[1-9]\d{1,14}$ - type: string - ref_id: - type: string - url: - format: uri - type: string - required: - - ref_id - type: object - Tag: - additionalProperties: false - description: Describes a tag. This is used to contain extended metadata. This - object can be added as a property to any schema to describe extended attributes. - For BAPs, tags can be sent during search to optimize and filter search results. - BPPs can use tags to index their catalog to allow better search functionality. - Tags are sent by the BPP as part of the catalog response in the `on_search` - callback. Tags are also meant for display purposes. Upon receiving a tag, - BAPs are meant to render them as name-value pairs. This is particularly useful - when rendering tabular information about a product or service. - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - description: Description of the Tag, can be used to store detailed information. - display: - description: This value indicates if the tag is intended for display purposes. - If set to `true`, then this tag must be displayed. If it is set to `false`, - it should not be displayed. This value can override the group display - value. - type: boolean - value: - description: The value of the tag. This set by the BPP and rendered as-is - by the BAP. - type: string - type: object - TagGroup: - additionalProperties: false - description: A collection of tag objects with group level attributes. For detailed - documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 - properties: - descriptor: - allOf: - - $ref: '#/components/schemas/Descriptor' - description: Description of the TagGroup, can be used to store detailed - information. - display: - default: true - description: Indicates the display properties of the tag group. If display - is set to false, then the group will not be displayed. If it is set to - true, it should be displayed. However, group-level display properties - can be overriden by individual tag-level display property. As this schema - is purely for catalog display purposes, it is not recommended to send - this value during search. - type: boolean - list: - description: An array of Tag objects listed under this group. This property - can be set by BAPs during search to narrow the `search` and achieve more - relevant results. When received during `on_search`, BAPs must render this - list under the heading described by the `name` property of this schema. - items: - $ref: '#/components/schemas/Tag' - type: array - type: object - Time: - additionalProperties: false - description: Describes time in its various forms. It can be a single point in - time; duration; or a structured timetable of operations - properties: - days: - description: comma separated values representing days of the week - type: string - duration: - $ref: '#/components/schemas/Duration' - label: - type: string - range: - properties: - end: - format: date-time - type: string - start: - format: date-time - type: string - type: object - schedule: - $ref: '#/components/schemas/Schedule' - timestamp: - format: date-time - type: string - type: object - Tracking: - additionalProperties: false - description: Contains tracking information that can be used by the BAP to track - the fulfillment of an order in real-time. which is useful for knowing the - location of time sensitive deliveries. - properties: - id: - description: A unique tracking reference number - type: string - location: - allOf: - - $ref: '#/components/schemas/Location' - description: In case there is no real-time tracking endpoint available, - this field will contain the latest location of the entity being tracked. - The BPP will update this value everytime the BAP calls the track API. - status: - description: This value indicates if the tracking is currently active or - not. If this value is `active`, then the BAP can begin tracking the order. - If this value is `inactive`, the tracking URL is considered to be expired - and the BAP should stop tracking the order. - enum: - - ACTIVE - - INACTIVE - type: string - url: - description: A URL to the tracking endpoint. This can be a link to a tracking - webpage, a webhook URL created by the BAP where BPP can push the tracking - data, or a GET url creaed by the BPP which the BAP can poll to get the - tracking data. It can also be a websocket URL where the BPP can push real-time - tracking data. - format: uri - type: string - type: object - Vehicle: - additionalProperties: false - description: Describes a vehicle is a device that is designed or used to transport - people or cargo over land, water, air, or through space.
This has properties - like category, capacity, make, model, size,variant,color,energy_type,registration - properties: - capacity: - type: integer - cargo_volumne: - type: string - category: - type: string - code: - type: string - color: - type: string - emission_standard: - type: string - energy_type: - type: string - make: - type: string - model: - type: string - registration: - type: string - size: - type: string - variant: - type: string - wheelchair_access: - type: string - wheels_count: - type: string - type: object - XInput: - additionalProperties: false - description: Contains any additional or extended inputs required to confirm - an order. This is typically a Form Input. Sometimes, selection of catalog - elements is not enough for the BPP to confirm an order. For example, to confirm - a flight ticket, the airline requires details of the passengers along with - information on baggage, identity, in addition to the class of ticket. Similarly, - a logistics company may require details on the nature of shipment in order - to confirm the shipping. A recruiting firm may require additional details - on the applicant in order to confirm a job application. For all such purposes, - the BPP can choose to send this object attached to any object in the catalog - that is required to be sent while placing the order. This object can typically - be sent at an item level or at the order level. The item level XInput will - override the Order level XInput as it indicates a special requirement of information - for that particular item. Hence the BAP must render a separate form for the - Item and another form at the Order level before confirmation. - properties: - form: - $ref: '#/components/schemas/Form' - required: - description: Indicates whether the form data is mandatorily required by - the BPP to confirm the order. - type: boolean - type: object - - diff --git a/api/l2-config/mobility_transitticket_1.1.0.yaml b/api/l2-config/mobility_transitticket_1.1.0_3.0.yaml similarity index 100% rename from api/l2-config/mobility_transitticket_1.1.0.yaml rename to api/l2-config/mobility_transitticket_1.1.0_3.0.yaml diff --git a/api/l2-config/option1/README b/api/l2-config/version3.1/README similarity index 100% rename from api/l2-config/option1/README rename to api/l2-config/version3.1/README diff --git a/api/l2-config/option1/example-jsons/requests/cancel.yaml b/api/l2-config/version3.1/example-jsons/requests/cancel.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/cancel.yaml rename to api/l2-config/version3.1/example-jsons/requests/cancel.yaml diff --git a/api/l2-config/option1/example-jsons/requests/confirm.yaml b/api/l2-config/version3.1/example-jsons/requests/confirm.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/confirm.yaml rename to api/l2-config/version3.1/example-jsons/requests/confirm.yaml diff --git a/api/l2-config/option1/example-jsons/requests/init.yaml b/api/l2-config/version3.1/example-jsons/requests/init.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/init.yaml rename to api/l2-config/version3.1/example-jsons/requests/init.yaml diff --git a/api/l2-config/option1/example-jsons/requests/rating.yaml b/api/l2-config/version3.1/example-jsons/requests/rating.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/rating.yaml rename to api/l2-config/version3.1/example-jsons/requests/rating.yaml diff --git a/api/l2-config/option1/example-jsons/requests/search.yaml b/api/l2-config/version3.1/example-jsons/requests/search.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/search.yaml rename to api/l2-config/version3.1/example-jsons/requests/search.yaml diff --git a/api/l2-config/option1/example-jsons/requests/select.yaml b/api/l2-config/version3.1/example-jsons/requests/select.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/select.yaml rename to api/l2-config/version3.1/example-jsons/requests/select.yaml diff --git a/api/l2-config/option1/example-jsons/requests/status.yaml b/api/l2-config/version3.1/example-jsons/requests/status.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/status.yaml rename to api/l2-config/version3.1/example-jsons/requests/status.yaml diff --git a/api/l2-config/option1/example-jsons/requests/support.yaml b/api/l2-config/version3.1/example-jsons/requests/support.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/support.yaml rename to api/l2-config/version3.1/example-jsons/requests/support.yaml diff --git a/api/l2-config/option1/example-jsons/requests/track.yaml b/api/l2-config/version3.1/example-jsons/requests/track.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/track.yaml rename to api/l2-config/version3.1/example-jsons/requests/track.yaml diff --git a/api/l2-config/option1/example-jsons/requests/update.yaml b/api/l2-config/version3.1/example-jsons/requests/update.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/requests/update.yaml rename to api/l2-config/version3.1/example-jsons/requests/update.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_cancel.yaml b/api/l2-config/version3.1/example-jsons/responses/on_cancel.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_cancel.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_cancel.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_confirm.yaml b/api/l2-config/version3.1/example-jsons/responses/on_confirm.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_confirm.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_confirm.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_init.yaml b/api/l2-config/version3.1/example-jsons/responses/on_init.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_init.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_init.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_rating.yaml b/api/l2-config/version3.1/example-jsons/responses/on_rating.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_rating.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_rating.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_search.yaml b/api/l2-config/version3.1/example-jsons/responses/on_search.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_search.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_search.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_select.yaml b/api/l2-config/version3.1/example-jsons/responses/on_select.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_select.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_select.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_status.yaml b/api/l2-config/version3.1/example-jsons/responses/on_status.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_status.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_status.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_support.yaml b/api/l2-config/version3.1/example-jsons/responses/on_support.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_support.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_support.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_track.yaml b/api/l2-config/version3.1/example-jsons/responses/on_track.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_track.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_track.yaml diff --git a/api/l2-config/option1/example-jsons/responses/on_update.yaml b/api/l2-config/version3.1/example-jsons/responses/on_update.yaml similarity index 100% rename from api/l2-config/option1/example-jsons/responses/on_update.yaml rename to api/l2-config/version3.1/example-jsons/responses/on_update.yaml diff --git a/api/l2-config/option1/example-rules/english_rules.yaml b/api/l2-config/version3.1/example-rules/english_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/english_rules.yaml rename to api/l2-config/version3.1/example-rules/english_rules.yaml diff --git a/api/l2-config/option1/example-rules/gpt_feed.yaml b/api/l2-config/version3.1/example-rules/gpt_feed.yaml similarity index 100% rename from api/l2-config/option1/example-rules/gpt_feed.yaml rename to api/l2-config/version3.1/example-rules/gpt_feed.yaml diff --git a/api/l2-config/option1/example-rules/requests/cancel/cancel.yaml b/api/l2-config/version3.1/example-rules/requests/cancel/cancel.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/cancel/cancel.yaml rename to api/l2-config/version3.1/example-rules/requests/cancel/cancel.yaml diff --git a/api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/cancel/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/cancel/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/cancel/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/confirm/confirm.yaml b/api/l2-config/version3.1/example-rules/requests/confirm/confirm.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/confirm/confirm.yaml rename to api/l2-config/version3.1/example-rules/requests/confirm/confirm.yaml diff --git a/api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/confirm/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/confirm/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/confirm/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/init/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/init/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/init/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/init/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/init/init.yaml b/api/l2-config/version3.1/example-rules/requests/init/init.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/init/init.yaml rename to api/l2-config/version3.1/example-rules/requests/init/init.yaml diff --git a/api/l2-config/option1/example-rules/requests/rating/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/rating/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/rating/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/rating/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/rating/rating.yaml b/api/l2-config/version3.1/example-rules/requests/rating/rating.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/rating/rating.yaml rename to api/l2-config/version3.1/example-rules/requests/rating/rating.yaml diff --git a/api/l2-config/option1/example-rules/requests/search/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/search/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/search/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/search/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/search/search.yaml b/api/l2-config/version3.1/example-rules/requests/search/search.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/search/search.yaml rename to api/l2-config/version3.1/example-rules/requests/search/search.yaml diff --git a/api/l2-config/option1/example-rules/requests/select/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/select/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/select/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/select/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/select/select.yaml b/api/l2-config/version3.1/example-rules/requests/select/select.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/select/select.yaml rename to api/l2-config/version3.1/example-rules/requests/select/select.yaml diff --git a/api/l2-config/option1/example-rules/requests/status/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/status/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/status/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/status/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/status/status.yaml b/api/l2-config/version3.1/example-rules/requests/status/status.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/status/status.yaml rename to api/l2-config/version3.1/example-rules/requests/status/status.yaml diff --git a/api/l2-config/option1/example-rules/requests/support/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/support/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/support/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/support/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/support/support.yaml b/api/l2-config/version3.1/example-rules/requests/support/support.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/support/support.yaml rename to api/l2-config/version3.1/example-rules/requests/support/support.yaml diff --git a/api/l2-config/option1/example-rules/requests/track/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/track/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/track/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/track/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/track/track.yaml b/api/l2-config/version3.1/example-rules/requests/track/track.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/track/track.yaml rename to api/l2-config/version3.1/example-rules/requests/track/track.yaml diff --git a/api/l2-config/option1/example-rules/requests/update/core_rules.yaml b/api/l2-config/version3.1/example-rules/requests/update/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/update/core_rules.yaml rename to api/l2-config/version3.1/example-rules/requests/update/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/requests/update/update.yaml b/api/l2-config/version3.1/example-rules/requests/update/update.yaml similarity index 100% rename from api/l2-config/option1/example-rules/requests/update/update.yaml rename to api/l2-config/version3.1/example-rules/requests/update/update.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_cancel/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_cancel/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_cancel/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml b/api/l2-config/version3.1/example-rules/responses/on_cancel/on_cancel.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_cancel/on_cancel.yaml rename to api/l2-config/version3.1/example-rules/responses/on_cancel/on_cancel.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml b/api/l2-config/version3.1/example-rules/responses/on_confirm/core_rule_1.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_confirm/core_rule_1.yaml rename to api/l2-config/version3.1/example-rules/responses/on_confirm/core_rule_1.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml b/api/l2-config/version3.1/example-rules/responses/on_confirm/on_confirm.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_confirm/on_confirm.yaml rename to api/l2-config/version3.1/example-rules/responses/on_confirm/on_confirm.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_init/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_init/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_init/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_init/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_init/on_init.yaml b/api/l2-config/version3.1/example-rules/responses/on_init/on_init.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_init/on_init.yaml rename to api/l2-config/version3.1/example-rules/responses/on_init/on_init.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_rating/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_rating/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_rating/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml b/api/l2-config/version3.1/example-rules/responses/on_rating/on_rating.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_rating/on_rating.yaml rename to api/l2-config/version3.1/example-rules/responses/on_rating/on_rating.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_search/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_search/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_search/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_search/on_search.yaml b/api/l2-config/version3.1/example-rules/responses/on_search/on_search.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_search/on_search.yaml rename to api/l2-config/version3.1/example-rules/responses/on_search/on_search.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_select/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_select/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_select/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_select/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_select/on_select.yaml b/api/l2-config/version3.1/example-rules/responses/on_select/on_select.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_select/on_select.yaml rename to api/l2-config/version3.1/example-rules/responses/on_select/on_select.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_status/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_status/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_status/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_status/on_status.yaml b/api/l2-config/version3.1/example-rules/responses/on_status/on_status.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_status/on_status.yaml rename to api/l2-config/version3.1/example-rules/responses/on_status/on_status.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_support/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_support/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_support/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_support/on_support.yaml b/api/l2-config/version3.1/example-rules/responses/on_support/on_support.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_support/on_support.yaml rename to api/l2-config/version3.1/example-rules/responses/on_support/on_support.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_track/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_track/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_track/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_track/on_track.yaml b/api/l2-config/version3.1/example-rules/responses/on_track/on_track.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_track/on_track.yaml rename to api/l2-config/version3.1/example-rules/responses/on_track/on_track.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml b/api/l2-config/version3.1/example-rules/responses/on_update/core_rules.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_update/core_rules.yaml rename to api/l2-config/version3.1/example-rules/responses/on_update/core_rules.yaml diff --git a/api/l2-config/option1/example-rules/responses/on_update/on_update.yaml b/api/l2-config/version3.1/example-rules/responses/on_update/on_update.yaml similarity index 100% rename from api/l2-config/option1/example-rules/responses/on_update/on_update.yaml rename to api/l2-config/version3.1/example-rules/responses/on_update/on_update.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/bap_order.yaml b/api/l2-config/version3.1/example-rules/shared-rules/bap_order.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/bap_order.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/bap_order.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml b/api/l2-config/version3.1/example-rules/shared-rules/fulfillments_rule.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/fulfillments_rule.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/fulfillments_rule.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/items_rule.yaml b/api/l2-config/version3.1/example-rules/shared-rules/items_rule.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/items_rule.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/items_rule.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml b/api/l2-config/version3.1/example-rules/shared-rules/payment_rule.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/payment_rule.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/payment_rule.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml b/api/l2-config/version3.1/example-rules/shared-rules/provider_rule.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/provider_rule.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/provider_rule.yaml diff --git a/api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml b/api/l2-config/version3.1/example-rules/shared-rules/quote_rule.yaml similarity index 100% rename from api/l2-config/option1/example-rules/shared-rules/quote_rule.yaml rename to api/l2-config/version3.1/example-rules/shared-rules/quote_rule.yaml diff --git a/api/l2-config/option1/final.yaml b/api/l2-config/version3.1/final.yaml similarity index 100% rename from api/l2-config/option1/final.yaml rename to api/l2-config/version3.1/final.yaml diff --git a/api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/version3.1/mobility_ondemandride_1.1.0_openapi_3.1.yaml similarity index 100% rename from api/l2-config/option1/mobility_ondemandride_1.1.0_openapi_3.1.yaml rename to api/l2-config/version3.1/mobility_ondemandride_1.1.0_openapi_3.1.yaml From 6d539b58f2ed7e74d23fbd85f6dc665c171a035a Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 6 Aug 2024 21:36:08 +0530 Subject: [PATCH 10/12] adding ONDC mobility rules in the mobility ride hailing layer 2 config --- api/l2-config/ONDC/README | 2 + .../ONDC/example-jsons/requests/cancel.yaml | 64 + .../ONDC/example-jsons/requests/confirm.yaml | 105 + .../ONDC/example-jsons/requests/init.yaml | 95 + .../ONDC/example-jsons/requests/rating.yaml | 23 + .../ONDC/example-jsons/requests/search.yaml | 57 + .../ONDC/example-jsons/requests/select.yaml | 169 + .../ONDC/example-jsons/requests/status.yaml | 40 + .../ONDC/example-jsons/requests/support.yaml | 23 + .../ONDC/example-jsons/requests/track.yaml | 20 + .../ONDC/example-jsons/requests/update.yaml | 0 .../example-jsons/responses/on_cancel.yaml | 432 + .../example-jsons/responses/on_confirm.yaml | 400 + .../ONDC/example-jsons/responses/on_init.yaml | 377 + .../example-jsons/responses/on_rating.yaml | 23 + .../example-jsons/responses/on_search.yaml | 648 ++ .../example-jsons/responses/on_select.yaml | 226 + .../example-jsons/responses/on_status.yaml | 981 ++ .../example-jsons/responses/on_support.yaml | 24 + .../example-jsons/responses/on_track.yaml | 21 + .../example-jsons/responses/on_update.yaml | 338 + .../cancellation_terms_rule_backup.yaml | 50 + .../backups/fulfillments_rule_backup.yaml | 82 + .../backups/payment_tag_rules_backup.yaml | 76 + .../backups/payment_tag_rules_backup2.yaml | 79 + .../ONDC/example-rules/english_rules.yaml | 107 + .../ONDC/example-rules/gpt_feed.yaml | 10 + .../example-rules/requests/cancel/action.yaml | 7 + .../example-rules/requests/cancel/cancel.yaml | 4 + .../requests/cancel/cancellation_rules.yaml | 21 + .../requests/confirm/action.yaml | 7 + .../requests/confirm/confirm.yaml | 10 + .../requests/confirm/core_rules.yaml | 30 + .../requests/confirm/order_id_rule.yaml | 7 + .../example-rules/requests/init/action.yaml | 7 + .../requests/init/core_rules.yaml | 0 .../example-rules/requests/init/init.yaml | 7 + .../example-rules/requests/rating/action.yaml | 7 + .../requests/rating/core_rules.yaml | 23 + .../example-rules/requests/rating/rating.yaml | 4 + .../example-rules/requests/search/action.yaml | 7 + .../requests/search/context_rules_backup.yaml | 43 + .../requests/search/fulfillment.yaml | 43 + .../requests/search/payment_tags.yaml | 70 + .../example-rules/requests/search/search.yaml | 6 + .../requests/search/tags_payment_enums.yaml | 30 + .../example-rules/requests/select/action.yaml | 7 + .../requests/select/core_rules.yaml | 0 .../example-rules/requests/select/select.yaml | 6 + .../example-rules/requests/status/action.yaml | 7 + .../requests/status/core_rules.yaml | 7 + .../example-rules/requests/status/status.yaml | 4 + .../requests/support/action.yaml | 7 + .../requests/support/core_rules.yaml | 9 + .../requests/support/support.yaml | 4 + .../example-rules/requests/track/action.yaml | 7 + .../requests/track/core_rules.yaml | 7 + .../example-rules/requests/track/track.yaml | 4 + .../example-rules/requests/update/action.yaml | 7 + .../requests/update/core_rules.yaml | 17 + .../example-rules/requests/update/update.yaml | 4 + .../responses/on_cancel/action.yaml | 7 + .../responses/on_cancel/core_rules.yaml | 0 .../responses/on_cancel/on_cancel.yaml | 20 + .../responses/on_cancel/reason_required.yaml | 11 + .../responses/on_cancel/status_enum.yaml | 12 + .../responses/on_confirm/action.yaml | 7 + .../responses/on_confirm/core_rule_1.yaml | 12 + .../responses/on_confirm/on_confirm.yaml | 18 + .../responses/on_init/action.yaml | 7 + .../responses/on_init/core_rules.yaml | 5 + .../on_init/fulfillment_rules_backup.yaml | 35 + .../responses/on_init/on_init.yaml | 12 + .../responses/on_rating/action.yaml | 7 + .../responses/on_rating/core_rules.yaml | 20 + .../responses/on_rating/on_rating.yaml | 4 + .../responses/on_search/action.yaml | 7 + .../responses/on_search/catalog_desc.yaml | 19 + .../on_search/catalog_providers.yaml | 18 + .../on_search/core_rules_backup.yaml | 109 + .../on_search/fulfillment_stops.yaml | 45 + .../responses/on_search/on_search.yaml | 11 + .../responses/on_search/provider_desc.yaml | 21 + .../on_search/provider_fulfillment.yaml | 32 + .../responses/on_search/provider_item.yaml | 50 + .../responses/on_search/provider_payment.yaml | 23 + .../tags/buyer_finder_fee/allowed_tags.yaml | 37 + .../on_search/tags/buyer_finder_fee/bff.yaml | 5 + .../tags/buyer_finder_fee/required_tags.yaml | 39 + .../tags/buyer_finder_fee/tag_types.yaml | 41 + .../on_search/tags/required_tag_groups.yaml | 33 + .../tags/settlement/allowed_tags.yaml | 44 + .../tags/settlement/required_tags.yaml | 69 + .../on_search/tags/settlement/settlement.yaml | 5 + .../on_search/tags/settlement/tag_types.yaml | 142 + .../responses/on_search/tags/tags.yaml | 4 + .../responses/on_select/action.yaml | 7 + .../responses/on_select/core_rules.yaml | 0 .../responses/on_select/on_select.yaml | 10 + .../responses/on_status/action.yaml | 7 + .../on_status/custom_quote_rule_backup.yaml | 41 + .../responses/on_status/on_status.yaml | 17 + .../responses/on_support/action.yaml | 7 + .../responses/on_support/core_rules.yaml | 18 + .../responses/on_support/on_support.yaml | 4 + .../responses/on_track/action.yaml | 7 + .../responses/on_track/core_rules.yaml | 22 + .../responses/on_track/on_track.yaml | 4 + .../responses/on_update/action.yaml | 7 + .../responses/on_update/on_update.yaml | 16 + .../example-rules/shared-rules/bap_order.yaml | 26 + .../shared-rules/billing_rules.yaml | 11 + .../shared-rules/cancellation_terms_rule.yaml | 45 + .../context_rules/base_context_rules.yaml | 41 + .../context_rules/context_rules.yaml | 7 + .../fulfillment_rules/agent_details.yaml | 31 + .../fulfillment_rules/basic_rules.yaml | 13 + .../fulfillment_rules/customer_details.yaml | 31 + .../fulfillment_base_rules.yaml | 6 + .../fulfillment_rules/fulfillment_rules.yaml | 3 + .../fulfillment_rules_part.yaml | 3 + .../fulfillment_rules_wo_agent.yaml | 9 + .../fulfillment_with_type.yaml | 3 + .../fulfillment_rules/no_agent.yaml | 13 + .../fulfillment_rules/state_required.yaml | 9 + .../fulfillment_rules/state_rule.yaml | 28 + .../fulfillment_rules/stops_auth.yaml | 26 + .../fulfillment_rules/stops_locations.yaml | 42 + .../fulfillment_rules/type_rule.yaml | 17 + .../fulfillment_rules/vehicle.yaml | 22 + .../fulfillment_rules/vehicle_details.yaml | 20 + .../shared-rules/item_rules/basic_rules.yaml | 41 + .../item_rules/fare_rules/allowed_tags.yaml | 42 + .../item_rules/fare_rules/fare_rules.yaml | 5 + .../item_rules/fare_rules/required_tags.yaml | 51 + .../item_rules/fare_rules/tag_types.yaml | 75 + .../shared-rules/item_rules/ids.yaml | 18 + .../item_rules/info_rules/allowed_tags.yaml | 35 + .../item_rules/info_rules/info_rules.yaml | 4 + .../item_rules/info_rules/required_tags.yaml | 37 + .../item_rules/info_rules/tag_types.yaml | 39 + .../shared-rules/item_rules/item_rules.yaml | 4 + .../example-rules/shared-rules/order_id.yaml | 6 + .../shared-rules/order_status_rule.yaml | 14 + .../payment_rules/payment_dynamic_rules.yaml | 28 + .../payment_rules/payment_misc.yaml | 44 + .../payment_rules/payment_param_rule.yaml | 20 + .../payment_rules/payment_rules.yaml | 3 + .../payment_rules/simple_payment_rules.yaml | 3 + .../tags/buyer_finder_fee/allowed_tags.yaml | 34 + .../tags/buyer_finder_fee/bff.yaml | 5 + .../tags/buyer_finder_fee/required_tags.yaml | 36 + .../tags/buyer_finder_fee/tag_types.yaml | 38 + .../tags/payment_tag_rule_backup.yaml | 131 + .../tags/required_tag_groups.yaml | 30 + .../tags/settlement/allowed_tags.yaml | 41 + .../tags/settlement/required_tags.yaml | 66 + .../tags/settlement/settlement.yaml | 5 + .../tags/settlement/tag_types.yaml | 139 + .../shared-rules/payment_rules/tags/tags.yaml | 4 + .../shared-rules/provider_rule.yaml | 14 + .../shared-rules/quote_rules/base_rules.yaml | 51 + .../shared-rules/quote_rules/quote_rules.yaml | 3 + .../quote_rules/required_fields.yaml | 39 + api/l2-config/ONDC/final.yaml | 9020 +++++++++++++++++ ...bility_ondemandride_1.1.0_openapi_3.1.yaml | 2828 ++++++ 166 files changed, 19359 insertions(+) create mode 100644 api/l2-config/ONDC/README create mode 100644 api/l2-config/ONDC/example-jsons/requests/cancel.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/confirm.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/init.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/rating.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/search.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/select.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/status.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/support.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/track.yaml create mode 100644 api/l2-config/ONDC/example-jsons/requests/update.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_cancel.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_confirm.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_init.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_rating.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_search.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_select.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_status.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_support.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_track.yaml create mode 100644 api/l2-config/ONDC/example-jsons/responses/on_update.yaml create mode 100644 api/l2-config/ONDC/example-rules/backups/cancellation_terms_rule_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/backups/fulfillments_rule_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup2.yaml create mode 100644 api/l2-config/ONDC/example-rules/english_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/gpt_feed.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/cancel/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/cancel/cancel.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/cancel/cancellation_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/confirm/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/confirm/confirm.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/confirm/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/confirm/order_id_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/init/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/init/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/init/init.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/rating/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/rating/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/rating/rating.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/context_rules_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/fulfillment.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/payment_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/search.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/search/tags_payment_enums.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/select/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/select/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/select/select.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/status/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/status/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/status/status.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/support/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/support/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/support/support.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/track/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/track/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/track/track.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/update/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/update/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/requests/update/update.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_cancel/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_cancel/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_cancel/reason_required.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_cancel/status_enum.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_confirm/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_confirm/core_rule_1.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_init/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_init/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_init/fulfillment_rules_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_rating/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_rating/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_rating/on_rating.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/catalog_desc.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/catalog_providers.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/core_rules_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/fulfillment_stops.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/provider_desc.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/provider_fulfillment.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/provider_item.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/bff.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/required_tag_groups.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/settlement.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_search/tags/tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_select/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_select/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_status/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_status/custom_quote_rule_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_support/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_support/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_support/on_support.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_track/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_track/core_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_track/on_track.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_update/action.yaml create mode 100644 api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/billing_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/cancellation_terms_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/context_rules/base_context_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/context_rules/context_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/agent_details.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/basic_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/customer_details.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_base_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_part.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/no_agent.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_required.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_locations.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/type_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle_details.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/basic_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/fare_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/ids.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/info_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/item_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/order_id.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/order_status_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_dynamic_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_param_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/simple_payment_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/bff.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/payment_tag_rule_backup.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/required_tag_groups.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/allowed_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/required_tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/settlement.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/tag_types.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/tags.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/provider_rule.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/quote_rules/quote_rules.yaml create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/quote_rules/required_fields.yaml create mode 100644 api/l2-config/ONDC/final.yaml create mode 100644 api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1.yaml diff --git a/api/l2-config/ONDC/README b/api/l2-config/ONDC/README new file mode 100644 index 0000000..b254e2f --- /dev/null +++ b/api/l2-config/ONDC/README @@ -0,0 +1,2 @@ +how to compile final.yaml from other components: +swagger-cli bundle mobility_ondemandride_1.1.0_openapi_3.1.yaml --outfile final.yaml --type yaml \ No newline at end of file diff --git a/api/l2-config/ONDC/example-jsons/requests/cancel.yaml b/api/l2-config/ONDC/example-jsons/requests/cancel.yaml new file mode 100644 index 0000000..58551fb --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/cancel.yaml @@ -0,0 +1,64 @@ +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' diff --git a/api/l2-config/ONDC/example-jsons/requests/confirm.yaml b/api/l2-config/ONDC/example-jsons/requests/confirm.yaml new file mode 100644 index 0000000..1a498e8 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/confirm.yaml @@ -0,0 +1,105 @@ +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' diff --git a/api/l2-config/ONDC/example-jsons/requests/init.yaml b/api/l2-config/ONDC/example-jsons/requests/init.yaml new file mode 100644 index 0000000..26814b7 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/init.yaml @@ -0,0 +1,95 @@ +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' diff --git a/api/l2-config/ONDC/example-jsons/requests/rating.yaml b/api/l2-config/ONDC/example-jsons/requests/rating.yaml new file mode 100644 index 0000000..e73e2a1 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/rating.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/requests/search.yaml b/api/l2-config/ONDC/example-jsons/requests/search.yaml new file mode 100644 index 0000000..a4bb471 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/search.yaml @@ -0,0 +1,57 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/requests/select.yaml b/api/l2-config/ONDC/example-jsons/requests/select.yaml new file mode 100644 index 0000000..9629dd0 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/select.yaml @@ -0,0 +1,169 @@ +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' diff --git a/api/l2-config/ONDC/example-jsons/requests/status.yaml b/api/l2-config/ONDC/example-jsons/requests/status.yaml new file mode 100644 index 0000000..6c96dc1 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/status.yaml @@ -0,0 +1,40 @@ +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' diff --git a/api/l2-config/ONDC/example-jsons/requests/support.yaml b/api/l2-config/ONDC/example-jsons/requests/support.yaml new file mode 100644 index 0000000..76e54e1 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/support.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/requests/track.yaml b/api/l2-config/ONDC/example-jsons/requests/track.yaml new file mode 100644 index 0000000..7ded9f7 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/requests/track.yaml @@ -0,0 +1,20 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/requests/update.yaml b/api/l2-config/ONDC/example-jsons/requests/update.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_cancel.yaml b/api/l2-config/ONDC/example-jsons/responses/on_cancel.yaml new file mode 100644 index 0000000..234b194 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_cancel.yaml @@ -0,0 +1,432 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/ONDC/example-jsons/responses/on_confirm.yaml b/api/l2-config/ONDC/example-jsons/responses/on_confirm.yaml new file mode 100644 index 0000000..5925175 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_confirm.yaml @@ -0,0 +1,400 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_init.yaml b/api/l2-config/ONDC/example-jsons/responses/on_init.yaml new file mode 100644 index 0000000..357b842 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_init.yaml @@ -0,0 +1,377 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/ONDC/example-jsons/responses/on_rating.yaml b/api/l2-config/ONDC/example-jsons/responses/on_rating.yaml new file mode 100644 index 0000000..dc8f519 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_rating.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_search.yaml b/api/l2-config/ONDC/example-jsons/responses/on_search.yaml new file mode 100644 index 0000000..1997f78 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_search.yaml @@ -0,0 +1,648 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_select.yaml b/api/l2-config/ONDC/example-jsons/responses/on_select.yaml new file mode 100644 index 0000000..eb430fd --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_select.yaml @@ -0,0 +1,226 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_status.yaml b/api/l2-config/ONDC/example-jsons/responses/on_status.yaml new file mode 100644 index 0000000..61af446 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_status.yaml @@ -0,0 +1,981 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_support.yaml b/api/l2-config/ONDC/example-jsons/responses/on_support.yaml new file mode 100644 index 0000000..b233792 --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_support.yaml @@ -0,0 +1,24 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_track.yaml b/api/l2-config/ONDC/example-jsons/responses/on_track.yaml new file mode 100644 index 0000000..ea142ee --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_track.yaml @@ -0,0 +1,21 @@ +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 diff --git a/api/l2-config/ONDC/example-jsons/responses/on_update.yaml b/api/l2-config/ONDC/example-jsons/responses/on_update.yaml new file mode 100644 index 0000000..3c29c5d --- /dev/null +++ b/api/l2-config/ONDC/example-jsons/responses/on_update.yaml @@ -0,0 +1,338 @@ +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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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: "\u20B9 30 upto 2 km" + - descriptor: + name: Rate above Min. Fare + display: true + value: "\u20B915 / km" + - descriptor: + name: Driver Pickup Charges + display: true + value: "\u20B9 10" + - descriptor: + name: Nominal Fare + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 10" + - descriptor: + name: Waiting Charges + short_desc: Driver may quote extra to cover for traffic, + chance of return trip, etc. + display: true + value: "\u20B9 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' diff --git a/api/l2-config/ONDC/example-rules/backups/cancellation_terms_rule_backup.yaml b/api/l2-config/ONDC/example-rules/backups/cancellation_terms_rule_backup.yaml new file mode 100644 index 0000000..0aa3df9 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/backups/cancellation_terms_rule_backup.yaml @@ -0,0 +1,50 @@ +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 + cancellation_fee: + oneOf: + - properties: + percentage: + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + required: + - percentage + - properties: + amount: + properties: + currency: + type: string + # enum: + # - INR + # - USD + # - EUR + # - AUD + value: + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + required: + - currency + - value + required: + - amount + required: + - fulfillment_state + - cancellation_fee + required: + - cancellation_terms diff --git a/api/l2-config/ONDC/example-rules/backups/fulfillments_rule_backup.yaml b/api/l2-config/ONDC/example-rules/backups/fulfillments_rule_backup.yaml new file mode 100644 index 0000000..19c8482 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/backups/fulfillments_rule_backup.yaml @@ -0,0 +1,82 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + properties: + stops: + type: array + minItems: 2 + items: + type: object + properties: + location: + type: object + properties: + gps: + type: string + required: + - gps + type: + type: string + enum: + - START + - END + authorization: + type: object + properties: + type: + type: string + enum: + - OTP + token: + type: string + pattern: '^-?\d+(\.\d+)?$' + required: + - type + - token + required: + - location + - type + 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 + vehicle: + properties: + category: + type: string + enum: + - AUTO_RICKSHAW + - CAB + required: + - category + type: + type: string + enum: + - DELIVERY + required: + - stops + - id + - type + - vehicle + required: + - fulfillments diff --git a/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup.yaml b/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup.yaml new file mode 100644 index 0000000..44ddbf1 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup.yaml @@ -0,0 +1,76 @@ +if: + properties: + message: + properties: + intent: + properties: + payment: + properties: + tags: + items: + properties: + descriptor: + properties: + code: + const: SETTLEMENT_TERMS +then: + properties: + message: + properties: + intent: + properties: + payment: + properties: + tags: + items: + 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 diff --git a/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup2.yaml b/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup2.yaml new file mode 100644 index 0000000..7455309 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/backups/payment_tag_rules_backup2.yaml @@ -0,0 +1,79 @@ +if: + properties: + message: + properties: + intent: + properties: + payment: + properties: + tags: + items: + properties: + descriptor: + properties: + code: + const: SETTLEMENT_TERMS +then: + properties: + message: + properties: + intent: + properties: + payment: + properties: + tags: + items: + 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 diff --git a/api/l2-config/ONDC/example-rules/english_rules.yaml b/api/l2-config/ONDC/example-rules/english_rules.yaml new file mode 100644 index 0000000..78a3d17 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/english_rules.yaml @@ -0,0 +1,107 @@ +# how to interpret this file. +# +# for each item at the 3rd level in this schema, there is a directory in the folder, +# for example there is a direcotry named "example-rules/requests/search" +# and there is a direcotry named "example-rules/responses/select" etc +# +# for each rule_name in this file, create a file with filename as +# example-rules/requests/search/.yaml if it is not already present. +# for example, for below +# +# example-rules: +# requests: +# search: +# - rule_name: core_rules +# rule_logic: "" +# +# you would add a file named "example-rules/requests/search/core_rules.yaml". +# +# in each of those files, add OpenAPI rule derived from the logic defined +# in corresponding rule_logic. +# +# now create one more file in each such direcotry with filename as +# example-rules/requests//.yaml +# for example example-rules/requests/search/search.yaml +# each of these files should import all the other files in the same direcotry +# with allOf keyword. +# +# if the rule_logic: "", ignore that rule, dont add in the folder. +# + +example-rules: + requests: + search: + - rule_name: core_rules + rule_logic: > + Intent requires fulfilment, Fulfilment requires stops, + Stops min len 2, items in stops require location, + location requires gps + select: + - rule_name: core_rules + rule_logic: "" + init: + - rule_name: core_rules + rule_logic: "" + confirm: + - rule_name: core_rules + rule_logic: "" + status: + - rule_name: core_rules + rule_logic: "" + track: + - rule_name: core_rules + rule_logic: "" + support: + - rule_name: core_rules + rule_logic: "" + update: + - rule_name: core_rules + rule_logic: "" + rating: + - rule_name: core_rules + rule_logic: "" + cancel: + - rule_name: core_rules + rule_logic: "" + responses: + on_search: + - rule_name: core_rules + rule_logic: > + catalog requires descriptor, providers + catalog.descriptor requires name, images + catalog.descriptor.images is not empty + each provider in providers requires id, descriptor, fulfillments, items, payments + provider.descriptor requires name, images + provider.descriptor.images is not empty + each payment in payments requires type, collected_by + each item in items requires descriptor, price + item.descriptor requires name + item.price requires value + on_select: + - rule_name: core_rules + rule_logic: "" + on_init: + - rule_name: core_rules + rule_logic: "" + on_confirm: + - rule_name: core_rules + rule_logic: "" + on_status: + - rule_name: core_rules + rule_logic: "" + on_track: + - rule_name: core_rules + rule_logic: "" + on_support: + - rule_name: core_rules + rule_logic: "" + on_update: + - rule_name: core_rules + rule_logic: "" + on_rating: + - rule_name: core_rules + rule_logic: "" + on_cancel: + - rule_name: core_rules + rule_logic: "" + diff --git a/api/l2-config/ONDC/example-rules/gpt_feed.yaml b/api/l2-config/ONDC/example-rules/gpt_feed.yaml new file mode 100644 index 0000000..38defde --- /dev/null +++ b/api/l2-config/ONDC/example-rules/gpt_feed.yaml @@ -0,0 +1,10 @@ +# Beckn schema has context and message. +# +# All the openAPI rules you add would be in the message section of the schema. +# +# +# +# +# +# +# diff --git a/api/l2-config/ONDC/example-rules/requests/cancel/action.yaml b/api/l2-config/ONDC/example-rules/requests/cancel/action.yaml new file mode 100644 index 0000000..61a2a00 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/cancel/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - cancel diff --git a/api/l2-config/ONDC/example-rules/requests/cancel/cancel.yaml b/api/l2-config/ONDC/example-rules/requests/cancel/cancel.yaml new file mode 100644 index 0000000..82a93ea --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/cancel/cancel.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./cancellation_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/cancel/cancellation_rules.yaml b/api/l2-config/ONDC/example-rules/requests/cancel/cancellation_rules.yaml new file mode 100644 index 0000000..76ca64f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/cancel/cancellation_rules.yaml @@ -0,0 +1,21 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/requests/confirm/action.yaml b/api/l2-config/ONDC/example-rules/requests/confirm/action.yaml new file mode 100644 index 0000000..67adbd0 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/confirm/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - confirm diff --git a/api/l2-config/ONDC/example-rules/requests/confirm/confirm.yaml b/api/l2-config/ONDC/example-rules/requests/confirm/confirm.yaml new file mode 100644 index 0000000..3c458e1 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/confirm/confirm.yaml @@ -0,0 +1,10 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/bap_order.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules_part.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "../../shared-rules/billing_rules.yaml" + - $ref: "./core_rules.yaml" + - $ref: "./order_id_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/confirm/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/confirm/core_rules.yaml new file mode 100644 index 0000000..dff3c78 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/confirm/core_rules.yaml @@ -0,0 +1,30 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/requests/confirm/order_id_rule.yaml b/api/l2-config/ONDC/example-rules/requests/confirm/order_id_rule.yaml new file mode 100644 index 0000000..24da08a --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/confirm/order_id_rule.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order: + not: + required: + - id \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/init/action.yaml b/api/l2-config/ONDC/example-rules/requests/init/action.yaml new file mode 100644 index 0000000..cb11d70 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/init/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - init diff --git a/api/l2-config/ONDC/example-rules/requests/init/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/init/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/ONDC/example-rules/requests/init/init.yaml b/api/l2-config/ONDC/example-rules/requests/init/init.yaml new file mode 100644 index 0000000..a684b6f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/init/init.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/bap_order.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml" + - $ref: "../../shared-rules/payment_rules/simple_payment_rules.yaml" + - $ref: "../../shared-rules/billing_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/rating/action.yaml b/api/l2-config/ONDC/example-rules/requests/rating/action.yaml new file mode 100644 index 0000000..bc68499 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/rating/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - rating diff --git a/api/l2-config/ONDC/example-rules/requests/rating/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/rating/core_rules.yaml new file mode 100644 index 0000000..96e6615 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/rating/core_rules.yaml @@ -0,0 +1,23 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/requests/rating/rating.yaml b/api/l2-config/ONDC/example-rules/requests/rating/rating.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/rating/rating.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/search/action.yaml b/api/l2-config/ONDC/example-rules/requests/search/action.yaml new file mode 100644 index 0000000..7870b16 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - search diff --git a/api/l2-config/ONDC/example-rules/requests/search/context_rules_backup.yaml b/api/l2-config/ONDC/example-rules/requests/search/context_rules_backup.yaml new file mode 100644 index 0000000..8cf7643 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/context_rules_backup.yaml @@ -0,0 +1,43 @@ +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 + not: + format: uri + bpp_id: + type: string + not: + format: uri + ttl: + type: string + format: date-time #PT10M + timestamp: + type: string + format: date-time + required: + - location + - domain + - action + - timestamp + - message_id + - transaction_id + - bap_id + - bap_uri + - ttl diff --git a/api/l2-config/ONDC/example-rules/requests/search/fulfillment.yaml b/api/l2-config/ONDC/example-rules/requests/search/fulfillment.yaml new file mode 100644 index 0000000..e960f91 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/fulfillment.yaml @@ -0,0 +1,43 @@ +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/search/payment_tags.yaml b/api/l2-config/ONDC/example-rules/requests/search/payment_tags.yaml new file mode 100644 index 0000000..01d86f3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/payment_tags.yaml @@ -0,0 +1,70 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/requests/search/search.yaml b/api/l2-config/ONDC/example-rules/requests/search/search.yaml new file mode 100644 index 0000000..86b55a5 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/search.yaml @@ -0,0 +1,6 @@ +allOf: + - $ref: "../../shared-rules/context_rules/base_context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./tags_payment_enums.yaml" + - $ref: "./payment_tags.yaml" + - $ref: "./fulfillment.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/search/tags_payment_enums.yaml b/api/l2-config/ONDC/example-rules/requests/search/tags_payment_enums.yaml new file mode 100644 index 0000000..5fd55b6 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/search/tags_payment_enums.yaml @@ -0,0 +1,30 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/requests/select/action.yaml b/api/l2-config/ONDC/example-rules/requests/select/action.yaml new file mode 100644 index 0000000..1da09c0 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/select/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - select diff --git a/api/l2-config/ONDC/example-rules/requests/select/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/select/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/ONDC/example-rules/requests/select/select.yaml b/api/l2-config/ONDC/example-rules/requests/select/select.yaml new file mode 100644 index 0000000..ffc05b2 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/select/select.yaml @@ -0,0 +1,6 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/bap_order.yaml" + #- $ref: "../../shared-rules/fulfillment_rules/fulfillment_base_rules.yaml" + #- $ref: "../../shared-rules/fulfillment_rules/no_agent.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/status/action.yaml b/api/l2-config/ONDC/example-rules/requests/status/action.yaml new file mode 100644 index 0000000..daa9d69 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/status/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - status diff --git a/api/l2-config/ONDC/example-rules/requests/status/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/status/core_rules.yaml new file mode 100644 index 0000000..708c92f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/status/core_rules.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order_id: + type: string + required: + - order_id diff --git a/api/l2-config/ONDC/example-rules/requests/status/status.yaml b/api/l2-config/ONDC/example-rules/requests/status/status.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/status/status.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/support/action.yaml b/api/l2-config/ONDC/example-rules/requests/support/action.yaml new file mode 100644 index 0000000..b677476 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/support/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - support diff --git a/api/l2-config/ONDC/example-rules/requests/support/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/support/core_rules.yaml new file mode 100644 index 0000000..5e89242 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/support/core_rules.yaml @@ -0,0 +1,9 @@ +properties: + message: + properties: + support: + properties: + ref_id: + type: string + required: + - ref_id diff --git a/api/l2-config/ONDC/example-rules/requests/support/support.yaml b/api/l2-config/ONDC/example-rules/requests/support/support.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/support/support.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/track/action.yaml b/api/l2-config/ONDC/example-rules/requests/track/action.yaml new file mode 100644 index 0000000..a34030f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/track/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - track diff --git a/api/l2-config/ONDC/example-rules/requests/track/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/track/core_rules.yaml new file mode 100644 index 0000000..708c92f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/track/core_rules.yaml @@ -0,0 +1,7 @@ +properties: + message: + properties: + order_id: + type: string + required: + - order_id diff --git a/api/l2-config/ONDC/example-rules/requests/track/track.yaml b/api/l2-config/ONDC/example-rules/requests/track/track.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/track/track.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/requests/update/action.yaml b/api/l2-config/ONDC/example-rules/requests/update/action.yaml new file mode 100644 index 0000000..a40ebc0 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/update/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - update diff --git a/api/l2-config/ONDC/example-rules/requests/update/core_rules.yaml b/api/l2-config/ONDC/example-rules/requests/update/core_rules.yaml new file mode 100644 index 0000000..9cc1272 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/update/core_rules.yaml @@ -0,0 +1,17 @@ +properties: + message: + type: object + properties: + order: + type: object + properties: + id: + type: string + required: + - id + update_target: + type: string + pattern: '^[^,]+(,[^,]+)*$' # Regular expression to ensure it's a comma-separated value + required: + - order + - update_target diff --git a/api/l2-config/ONDC/example-rules/requests/update/update.yaml b/api/l2-config/ONDC/example-rules/requests/update/update.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/requests/update/update.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/action.yaml new file mode 100644 index 0000000..4bce784 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_cancel/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_cancel diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml new file mode 100644 index 0000000..131701f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml @@ -0,0 +1,20 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "../../shared-rules/cancellation_terms_rule.yaml" + #- $ref: "./core_rules.yaml" + # rules needed for a confirmed order + - $ref: "../../shared-rules/payment_rules/payment_dynamic_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/vehicle_details.yaml" + - $ref: "../../shared-rules/fulfillment_rules/state_required.yaml" + - $ref: "../../shared-rules/order_id.yaml" +# enums for cancelled order + - $ref: "./status_enum.yaml" + - $ref: "./reason_required.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/reason_required.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/reason_required.yaml new file mode 100644 index 0000000..20fed18 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_cancel/reason_required.yaml @@ -0,0 +1,11 @@ +properties: + message: + properties: + order: + properties: + cancellation_terms: + items: + required: + - reason_required + required: + - cancellation_terms diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/status_enum.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/status_enum.yaml new file mode 100644 index 0000000..2a60e8a --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_cancel/status_enum.yaml @@ -0,0 +1,12 @@ +properties: + message: + properties: + order: + properties: + status: + type: string + enum: + - CANCELLED + - SOFT_CANCEL + required: + - status diff --git a/api/l2-config/ONDC/example-rules/responses/on_confirm/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_confirm/action.yaml new file mode 100644 index 0000000..e28fd5b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_confirm/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_confirm diff --git a/api/l2-config/ONDC/example-rules/responses/on_confirm/core_rule_1.yaml b/api/l2-config/ONDC/example-rules/responses/on_confirm/core_rule_1.yaml new file mode 100644 index 0000000..8a1eac8 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_confirm/core_rule_1.yaml @@ -0,0 +1,12 @@ +properties: + message: + properties: + order: + properties: + status: + type: string + enum: + - COMPLETE + - ACTIVE + required: + - status diff --git a/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml b/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml new file mode 100644 index 0000000..6c3908d --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml @@ -0,0 +1,18 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "./core_rule_1.yaml" + #- $ref: "../../shared-rules/billing_rules.yaml" + - $ref: "../../shared-rules/cancellation_terms_rule.yaml" + - $ref: "../../shared-rules/order_status_rule.yaml" + - $ref: "../../shared-rules/payment_rules/payment_dynamic_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/state_required.yaml" + - $ref: "../../shared-rules/fulfillment_rules/vehicle_details.yaml" + - $ref: "../../shared-rules/order_id.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_init/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_init/action.yaml new file mode 100644 index 0000000..4300905 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_init/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_init diff --git a/api/l2-config/ONDC/example-rules/responses/on_init/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_init/core_rules.yaml new file mode 100644 index 0000000..4761608 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_init/core_rules.yaml @@ -0,0 +1,5 @@ +properties: + message: + type: object +required: + - message \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_init/fulfillment_rules_backup.yaml b/api/l2-config/ONDC/example-rules/responses/on_init/fulfillment_rules_backup.yaml new file mode 100644 index 0000000..06a7e01 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_init/fulfillment_rules_backup.yaml @@ -0,0 +1,35 @@ +allOf: + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" + - properties: + message: + properties: + order: + properties: + fulfillments: + type: array + items: + allOf: + - properties: + customer: + properties: + contact: + properties: + phone: + type: string + required: + - phone + person: + properties: + name: + type: string + required: + - name + required: + - contact + - person + required: + - customer + - not: + required: + - agent + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml b/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml new file mode 100644 index 0000000..d4ed979 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml @@ -0,0 +1,12 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "../../shared-rules/cancellation_terms_rule.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_rating/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_rating/action.yaml new file mode 100644 index 0000000..5d3d568 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_rating/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_rating diff --git a/api/l2-config/ONDC/example-rules/responses/on_rating/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_rating/core_rules.yaml new file mode 100644 index 0000000..dd85573 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_rating/core_rules.yaml @@ -0,0 +1,20 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/responses/on_rating/on_rating.yaml b/api/l2-config/ONDC/example-rules/responses/on_rating/on_rating.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_rating/on_rating.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/action.yaml new file mode 100644 index 0000000..8db2324 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_search diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/catalog_desc.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/catalog_desc.yaml new file mode 100644 index 0000000..8cedd83 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/catalog_desc.yaml @@ -0,0 +1,19 @@ +properties: + message: + properties: + catalog: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + required: + - descriptor diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/catalog_providers.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/catalog_providers.yaml new file mode 100644 index 0000000..3084b45 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/catalog_providers.yaml @@ -0,0 +1,18 @@ +properties: + message: + properties: + catalog: + type: object + properties: + providers: + type: array + minItems: 1 # Ensure at least one provider + items: + type: object + properties: + id: + type: string + required: + - id + required: + - providers diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/core_rules_backup.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/core_rules_backup.yaml new file mode 100644 index 0000000..b84c9b0 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/core_rules_backup.yaml @@ -0,0 +1,109 @@ +properties: + message: + properties: + catalog: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + providers: + type: array + minItems: 1 # Ensure at least one provider + items: + type: object + properties: + id: + type: string + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + fulfillments: + type: array + minItems: 1 # Ensure at least one fulfillment + items: + properties: + vehicle: + properties: + category: + type: string + enum: + - AUTO_RICKSHAW + - CAB + required: + - category + type: + type: string + enum: + - DELIVERY + required: + - id + - vehicle + - type + items: + type: array + minItems: 1 # Ensure at least one item + items: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + code: + type: string + enum: + - RIDE + # Add any other descriptor properties here + required: + - name + - code + price: + type: object + properties: + value: + type: number + # Add any other price properties here + required: + - value + required: + - id + - descriptor + payments: + type: array + minItems: 1 # Ensure at least one payment + items: + type: object + properties: + type: + type: string + collected_by: + type: string + required: + - type + - collected_by + required: + - id + - fulfillments + - items + - payments + required: + - descriptor + - providers diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/fulfillment_stops.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/fulfillment_stops.yaml new file mode 100644 index 0000000..4fc7f9b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/fulfillment_stops.yaml @@ -0,0 +1,45 @@ +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml new file mode 100644 index 0000000..400c37f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./catalog_desc.yaml" + - $ref: "./catalog_providers.yaml" + - $ref: "./provider_desc.yaml" + - $ref: "./provider_fulfillment.yaml" + - $ref: "./provider_item.yaml" + - $ref: "./provider_payment.yaml" + - $ref: "./fulfillment_Stops.yaml" + - $ref: "./tags/tags.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/provider_desc.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/provider_desc.yaml new file mode 100644 index 0000000..28bad5c --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/provider_desc.yaml @@ -0,0 +1,21 @@ +properties: + message: + properties: + catalog: + properties: + providers: + items: + properties: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 # Ensure at least one image + required: + - name + required: + - descriptor diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/provider_fulfillment.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/provider_fulfillment.yaml new file mode 100644 index 0000000..9378e48 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/provider_fulfillment.yaml @@ -0,0 +1,32 @@ +properties: + message: + properties: + catalog: + properties: + providers: + items: + properties: + fulfillments: + type: array + minItems: 1 # Ensure at least one fulfillment + items: + properties: + vehicle: + properties: + category: + type: string + enum: + - AUTO_RICKSHAW + - CAB + required: + - category + type: + type: string + enum: + - DELIVERY + required: + - id + - vehicle + - type + required: + - fulfillments diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/provider_item.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/provider_item.yaml new file mode 100644 index 0000000..8b82af6 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/provider_item.yaml @@ -0,0 +1,50 @@ +properties: + message: + properties: + catalog: + properties: + providers: + items: + properties: + items: + type: array + minItems: 1 # Ensure at least one item + items: + type: object + properties: + descriptor: + type: object + properties: + name: + type: string + code: + type: string + enum: + - RIDE + # Add any other descriptor properties here + required: + - code + price: + type: object + properties: + value: + type: string + pattern: '^-?\d+(\.\d+)?$' + # Add any other price properties here + 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 diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml new file mode 100644 index 0000000..b0dc2bc --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml @@ -0,0 +1,23 @@ +properties: + message: + properties: + catalog: + properties: + providers: + items: + properties: + payments: + type: array + minItems: 1 # Ensure at least one payment + items: + type: object + properties: + type: + type: string + collected_by: + type: string + required: + - type + - collected_by + required: + - payments diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/allowed_tags.yaml new file mode 100644 index 0000000..74d462d --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/allowed_tags.yaml @@ -0,0 +1,37 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/bff.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/bff.yaml new file mode 100644 index 0000000..c376afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/bff.yaml @@ -0,0 +1,5 @@ +#structure it like u did for search SETTLEMENT_TERMS +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/required_tags.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/required_tags.yaml new file mode 100644 index 0000000..29fb065 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/required_tags.yaml @@ -0,0 +1,39 @@ +#structure it like u did for search SETTLEMENT_TERMS +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: # there should not be a "type: array" block below this. dont know the reason yet. + allOf: + - contains: + type: object + properties: + descriptor: + type: object + properties: + code: + const: BUYER_FINDER_FEES_PERCENTAGE + required: + - code + value: + type: string + required: + - descriptor + - value diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/tag_types.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/tag_types.yaml new file mode 100644 index 0000000..0f16253 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/buyer_finder_fee/tag_types.yaml @@ -0,0 +1,41 @@ +#structure it like u did for search SETTLEMENT_TERMS +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/required_tag_groups.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/required_tag_groups.yaml new file mode 100644 index 0000000..b15724f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/required_tag_groups.yaml @@ -0,0 +1,33 @@ + +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 + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/allowed_tags.yaml new file mode 100644 index 0000000..6211760 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/allowed_tags.yaml @@ -0,0 +1,44 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/required_tags.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/required_tags.yaml new file mode 100644 index 0000000..46fa0b4 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/required_tags.yaml @@ -0,0 +1,69 @@ +#structure it like u did for search SETTLEMENT_TERMS +properties: + message: + properties: + catalog: + properties: + providers: + items: + properties: + payments: + items: + properties: + tags: + items: + if: + properties: + descriptor: + properties: + code: + const: SETTLEMENT_TERMS + then: + properties: + list: # there should not be a "type: array" block below this. dont know the reason yet. + 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 diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/settlement.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/settlement.yaml new file mode 100644 index 0000000..c376afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/settlement.yaml @@ -0,0 +1,5 @@ +#structure it like u did for search SETTLEMENT_TERMS +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/tag_types.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/tag_types.yaml new file mode 100644 index 0000000..e94e508 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/settlement/tag_types.yaml @@ -0,0 +1,142 @@ +#structure it like u did for search SETTLEMENT_TERMS +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/tags/tags.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/tags/tags.yaml new file mode 100644 index 0000000..562623a --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_search/tags/tags.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "./buyer_finder_fee/bff.yaml" + - $ref: "./settlement/settlement.yaml" + - $ref: "./required_tag_groups.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_select/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_select/action.yaml new file mode 100644 index 0000000..2227ff8 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_select/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_select diff --git a/api/l2-config/ONDC/example-rules/responses/on_select/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_select/core_rules.yaml new file mode 100644 index 0000000..e69de29 diff --git a/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml b/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml new file mode 100644 index 0000000..bcbd216 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml @@ -0,0 +1,10 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_base_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/fulfillment_rules/no_agent.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_status/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_status/action.yaml new file mode 100644 index 0000000..8494fa8 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_status/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_status diff --git a/api/l2-config/ONDC/example-rules/responses/on_status/custom_quote_rule_backup.yaml b/api/l2-config/ONDC/example-rules/responses/on_status/custom_quote_rule_backup.yaml new file mode 100644 index 0000000..4b4a1e0 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_status/custom_quote_rule_backup.yaml @@ -0,0 +1,41 @@ +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 + + diff --git a/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml b/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml new file mode 100644 index 0000000..62201fc --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml @@ -0,0 +1,17 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "../../shared-rules/cancellation_terms_rule.yaml" + #- $ref: "../../shared-rules/billing_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_dynamic_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/vehicle_details.yaml" + - $ref: "../../shared-rules/fulfillment_rules/state_required.yaml" + - $ref: "../../shared-rules/order_id.yaml" + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_support/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_support/action.yaml new file mode 100644 index 0000000..b590fe1 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_support/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_support diff --git a/api/l2-config/ONDC/example-rules/responses/on_support/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_support/core_rules.yaml new file mode 100644 index 0000000..20940f2 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_support/core_rules.yaml @@ -0,0 +1,18 @@ +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"] diff --git a/api/l2-config/ONDC/example-rules/responses/on_support/on_support.yaml b/api/l2-config/ONDC/example-rules/responses/on_support/on_support.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_support/on_support.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_track/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_track/action.yaml new file mode 100644 index 0000000..5ce8437 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_track/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_track diff --git a/api/l2-config/ONDC/example-rules/responses/on_track/core_rules.yaml b/api/l2-config/ONDC/example-rules/responses/on_track/core_rules.yaml new file mode 100644 index 0000000..4f06dda --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_track/core_rules.yaml @@ -0,0 +1,22 @@ +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"] diff --git a/api/l2-config/ONDC/example-rules/responses/on_track/on_track.yaml b/api/l2-config/ONDC/example-rules/responses/on_track/on_track.yaml new file mode 100644 index 0000000..b9048b3 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_track/on_track.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "./core_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/responses/on_update/action.yaml b/api/l2-config/ONDC/example-rules/responses/on_update/action.yaml new file mode 100644 index 0000000..b4d2afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_update/action.yaml @@ -0,0 +1,7 @@ +properties: + context: + properties: + action: + type: string + enum: + - on_update diff --git a/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml b/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml new file mode 100644 index 0000000..6c98cc1 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml @@ -0,0 +1,16 @@ +allOf: + - $ref: "../../shared-rules/context_rules/context_rules.yaml" + - $ref: "./action.yaml" + - $ref: "../../shared-rules/provider_rule.yaml" + - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/ids.yaml" + - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" + - $ref: "../../shared-rules/quote_rules/quote_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_rules.yaml" + - $ref: "../../shared-rules/cancellation_terms_rule.yaml" + #- $ref: "../../shared-rules/billing_rules.yaml" + - $ref: "../../shared-rules/payment_rules/payment_dynamic_rules.yaml" + - $ref: "../../shared-rules/fulfillment_rules/vehicle_details.yaml" + - $ref: "../../shared-rules/fulfillment_rules/state_required.yaml" + - $ref: "../../shared-rules/order_id.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml b/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml new file mode 100644 index 0000000..2a3c112 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml @@ -0,0 +1,26 @@ +# describes BAP's view of a basic order. what we send in a request, select onwards. +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/billing_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/billing_rules.yaml new file mode 100644 index 0000000..65a2e32 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/billing_rules.yaml @@ -0,0 +1,11 @@ +properties: + message: + properties: + order: + properties: + billing: + required: + - name + required: + - billing + diff --git a/api/l2-config/ONDC/example-rules/shared-rules/cancellation_terms_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/cancellation_terms_rule.yaml new file mode 100644 index 0000000..6e3a810 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/cancellation_terms_rule.yaml @@ -0,0 +1,45 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/context_rules/base_context_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/context_rules/base_context_rules.yaml new file mode 100644 index 0000000..90dd802 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/context_rules/base_context_rules.yaml @@ -0,0 +1,41 @@ +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 #PT10M + timestamp: + type: string + format: date-time + required: + - location + - domain + - action + - message_id + - transaction_id + - timestamp + - bap_id + - bap_uri + - ttl diff --git a/api/l2-config/ONDC/example-rules/shared-rules/context_rules/context_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/context_rules/context_rules.yaml new file mode 100644 index 0000000..a474057 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/context_rules/context_rules.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: "./base_context_rules.yaml" + - properties: + context: + required: + - bpp_id + - bpp_uri \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/agent_details.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/agent_details.yaml new file mode 100644 index 0000000..454a404 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/agent_details.yaml @@ -0,0 +1,31 @@ +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 + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/basic_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/basic_rules.yaml new file mode 100644 index 0000000..3546139 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/basic_rules.yaml @@ -0,0 +1,13 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + required: + - id + required: + - fulfillments diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/customer_details.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/customer_details.yaml new file mode 100644 index 0000000..e604d2f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/customer_details.yaml @@ -0,0 +1,31 @@ +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 + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_base_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_base_rules.yaml new file mode 100644 index 0000000..5c16819 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_base_rules.yaml @@ -0,0 +1,6 @@ +allOf: + - $ref: "./basic_rules.yaml" + - $ref: "./state_rule.yaml" + - $ref: "./stops_auth.yaml" + - $ref: "./stops_locations.yaml" + - $ref: "./vehicle.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules.yaml new file mode 100644 index 0000000..0081e33 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./fulfillment_rules_part.yaml" + - $ref: "./agent_details.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_part.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_part.yaml new file mode 100644 index 0000000..b25b882 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_part.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./fulfillment_base_rules.yaml" + - $ref: "./customer_details.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml new file mode 100644 index 0000000..2f6c4f4 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: "./fulfillment_rules_part.yaml" + - $ref: "./no_agent.yaml" + - properties: + message: + properties: + order: + required: + - fulfillments \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml new file mode 100644 index 0000000..a13f178 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./fulfillment_base_rules.yaml" + - $ref: "./type_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/no_agent.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/no_agent.yaml new file mode 100644 index 0000000..2fb0d3f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/no_agent.yaml @@ -0,0 +1,13 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + items: + allOf: + - not: + required: + - agent + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_required.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_required.yaml new file mode 100644 index 0000000..eb5a6be --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_required.yaml @@ -0,0 +1,9 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + items: + required: + - state \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_rule.yaml new file mode 100644 index 0000000..f347777 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/state_rule.yaml @@ -0,0 +1,28 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml new file mode 100644 index 0000000..3a19546 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml @@ -0,0 +1,26 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + properties: + stops: + items: + properties: + authorization: + type: object + properties: + type: + type: string + enum: + - OTP + token: + type: string + pattern: '^-?\d+(\.\d+)?$' + required: + - type + - token diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_locations.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_locations.yaml new file mode 100644 index 0000000..406df2f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_locations.yaml @@ -0,0 +1,42 @@ +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/type_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/type_rule.yaml new file mode 100644 index 0000000..0af5b1b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/type_rule.yaml @@ -0,0 +1,17 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + minItems: 1 + items: + type: object + properties: + type: + type: string + enum: + - DELIVERY + required: + - type diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle.yaml new file mode 100644 index 0000000..d9e1841 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle.yaml @@ -0,0 +1,22 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle_details.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle_details.yaml new file mode 100644 index 0000000..4eb9563 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/vehicle_details.yaml @@ -0,0 +1,20 @@ +properties: + message: + properties: + order: + properties: + fulfillments: + type: array + items: + properties: + vehicle: + type: object + properties: + registration: + type: string + required: + - registration + - make + - model + required: + - vehicle diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/basic_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/basic_rules.yaml new file mode 100644 index 0000000..407bd8c --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/basic_rules.yaml @@ -0,0 +1,41 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/allowed_tags.yaml new file mode 100644 index 0000000..ee5784f --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/allowed_tags.yaml @@ -0,0 +1,42 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/fare_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/fare_rules.yaml new file mode 100644 index 0000000..c376afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/fare_rules.yaml @@ -0,0 +1,5 @@ +#structure it like u did for search SETTLEMENT_TERMS +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml new file mode 100644 index 0000000..97dac6d --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml @@ -0,0 +1,51 @@ +#structure it like u did for search SETTLEMENT_TERMS +properties: + message: + properties: + order: + properties: + items: + items: + properties: + tags: + items: + if: + properties: + descriptor: + properties: + code: + const: FARE_POLICY + then: + properties: + list: # there should not be a "type: array" block below this. dont know the reason yet. + allOf: + - contains: + type: object + properties: + descriptor: + type: object + properties: + code: + const: MIN_FARE + required: + - code + value: + type: string + required: + - descriptor + - value + - contains: + type: object + properties: + descriptor: + type: object + properties: + code: + const: MIN_FARE_DISTANCE_KM + required: + - code + value: + type: string + required: + - descriptor + - value diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/tag_types.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/tag_types.yaml new file mode 100644 index 0000000..abe6215 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/tag_types.yaml @@ -0,0 +1,75 @@ +#structure it like u did for search SETTLEMENT_TERMS +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 + #format: time + 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 + #format: uri + pattern: '^https?://[^\s/$.?#].[^\s]*$' + required: + - descriptor + - value \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/ids.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/ids.yaml new file mode 100644 index 0000000..3cad134 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/ids.yaml @@ -0,0 +1,18 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/allowed_tags.yaml new file mode 100644 index 0000000..548d561 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/allowed_tags.yaml @@ -0,0 +1,35 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/info_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/info_rules.yaml new file mode 100644 index 0000000..44e341b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/info_rules.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml new file mode 100644 index 0000000..777a83b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml @@ -0,0 +1,37 @@ +#structure it like u did for search SETTLEMENT_TERMS +properties: + message: + properties: + order: + properties: + items: + items: + properties: + tags: + items: + if: + properties: + descriptor: + properties: + code: + const: INFO + then: + properties: + list: # there should not be a "type: array" block below this. dont know the reason yet. + 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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/tag_types.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/tag_types.yaml new file mode 100644 index 0000000..d5cfc60 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/tag_types.yaml @@ -0,0 +1,39 @@ +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/item_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/item_rules.yaml new file mode 100644 index 0000000..3d81608 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/item_rules.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "./basic_rules.yaml" + - $ref: "./fare_rules/fare_rules.yaml" + - $ref: "./info_rules/info_rules.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/order_id.yaml b/api/l2-config/ONDC/example-rules/shared-rules/order_id.yaml new file mode 100644 index 0000000..8d72c32 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/order_id.yaml @@ -0,0 +1,6 @@ +properties: + message: + properties: + order: + required: + - id \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/order_status_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/order_status_rule.yaml new file mode 100644 index 0000000..354a416 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/order_status_rule.yaml @@ -0,0 +1,14 @@ +properties: + message: + properties: + order: + properties: + status: + type: string + enum: + - COMPLETE + - ACTIVE + - CANCELLED + - SOFT_CANCEL + required: + - status diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_dynamic_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_dynamic_rules.yaml new file mode 100644 index 0000000..4799a12 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_dynamic_rules.yaml @@ -0,0 +1,28 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml new file mode 100644 index 0000000..bc02e62 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml @@ -0,0 +1,44 @@ +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: + - amount + - currency + required: + - type + - status + - collected_by + - params + required: + - payments diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_param_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_param_rule.yaml new file mode 100644 index 0000000..83fc42b --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_param_rule.yaml @@ -0,0 +1,20 @@ +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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_rules.yaml new file mode 100644 index 0000000..711f4af --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_rules.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./simple_payment_rules.yaml" + - $ref: "./tags/tags.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/simple_payment_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/simple_payment_rules.yaml new file mode 100644 index 0000000..8ba3d08 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/simple_payment_rules.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./payment_misc.yaml" + - $ref: "./payment_param_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/allowed_tags.yaml new file mode 100644 index 0000000..05d1d60 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/allowed_tags.yaml @@ -0,0 +1,34 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/bff.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/bff.yaml new file mode 100644 index 0000000..c376afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/bff.yaml @@ -0,0 +1,5 @@ +#structure it like u did for search SETTLEMENT_TERMS +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/required_tags.yaml new file mode 100644 index 0000000..7db6830 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/required_tags.yaml @@ -0,0 +1,36 @@ +#structure it like u did for search SETTLEMENT_TERMS +properties: + message: + properties: + order: + properties: + payments: + items: + properties: + tags: + items: + if: + properties: + descriptor: + properties: + code: + const: BUYER_FINDER_FEES + then: + properties: + list: # there should not be a "type: array" block below this. dont know the reason yet. + allOf: + - contains: + type: object + properties: + descriptor: + type: object + properties: + code: + const: BUYER_FINDER_FEES_PERCENTAGE + required: + - code + value: + type: string + required: + - descriptor + - value diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/tag_types.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/tag_types.yaml new file mode 100644 index 0000000..06b0e50 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/buyer_finder_fee/tag_types.yaml @@ -0,0 +1,38 @@ +#structure it like u did for search SETTLEMENT_TERMS +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/payment_tag_rule_backup.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/payment_tag_rule_backup.yaml new file mode 100644 index 0000000..01bcb67 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/payment_tag_rule_backup.yaml @@ -0,0 +1,131 @@ + +properties: + message: + properties: + order: + properties: + payments: + items: + properties: + tags: + items: + properties: + list: + 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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/required_tag_groups.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/required_tag_groups.yaml new file mode 100644 index 0000000..147e394 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/required_tag_groups.yaml @@ -0,0 +1,30 @@ + +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 + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/allowed_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/allowed_tags.yaml new file mode 100644 index 0000000..60029d4 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/allowed_tags.yaml @@ -0,0 +1,41 @@ +#structure it like u did for search SETTLEMENT_TERMS +# we can define 3 things on a set of tags +# 1. a list of tag values allowed under a taggroup. +# 2. type of value for each of those tags +# 3. the must have tags from the list (must be present in that taggroup) +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/required_tags.yaml new file mode 100644 index 0000000..b40cf49 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/required_tags.yaml @@ -0,0 +1,66 @@ +#structure it like u did for search SETTLEMENT_TERMS +properties: + message: + properties: + order: + properties: + payments: + items: + properties: + tags: + items: + if: + properties: + descriptor: + properties: + code: + const: SETTLEMENT_TERMS + then: + properties: + list: # there should not be a "type: array" block below this. dont know the reason yet. + 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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/settlement.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/settlement.yaml new file mode 100644 index 0000000..c376afa --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/settlement.yaml @@ -0,0 +1,5 @@ +#structure it like u did for search SETTLEMENT_TERMS +allOf: + - $ref: "./allowed_tags.yaml" + - $ref: "./required_tags.yaml" + - $ref: "./tag_types.yaml" diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/tag_types.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/tag_types.yaml new file mode 100644 index 0000000..919f0d8 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/settlement/tag_types.yaml @@ -0,0 +1,139 @@ +#structure it like u did for search SETTLEMENT_TERMS +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/tags.yaml new file mode 100644 index 0000000..562623a --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/tags/tags.yaml @@ -0,0 +1,4 @@ +allOf: + - $ref: "./buyer_finder_fee/bff.yaml" + - $ref: "./settlement/settlement.yaml" + - $ref: "./required_tag_groups.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/provider_rule.yaml b/api/l2-config/ONDC/example-rules/shared-rules/provider_rule.yaml new file mode 100644 index 0000000..f2a2da4 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/provider_rule.yaml @@ -0,0 +1,14 @@ +properties: + message: + properties: + order: + properties: + provider: + type: object + properties: + id: + type: string + required: + - id + required: + - provider diff --git a/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml new file mode 100644 index 0000000..435a9fc --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml @@ -0,0 +1,51 @@ +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_CHARGE + required: + - price + - title + required: + - price + - breakup + required: + - quote diff --git a/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/quote_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/quote_rules.yaml new file mode 100644 index 0000000..23783f8 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/quote_rules.yaml @@ -0,0 +1,3 @@ +allOf: + - $ref: "./base_rules.yaml" + - $ref: "./required_fields.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/required_fields.yaml b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/required_fields.yaml new file mode 100644 index 0000000..5fb3491 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/required_fields.yaml @@ -0,0 +1,39 @@ +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 \ No newline at end of file diff --git a/api/l2-config/ONDC/final.yaml b/api/l2-config/ONDC/final.yaml new file mode 100644 index 0000000..892605f --- /dev/null +++ b/api/l2-config/ONDC/final.yaml @@ -0,0 +1,9020 @@ +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/7' + - 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: + - amount + - currency + 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/5' + - 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 + required: + - descriptor + - value + - contains: + type: object + properties: + descriptor: + type: object + properties: + code: + const: MIN_FARE_DISTANCE_KM + required: + - code + value: + type: string + 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 + - 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: + descriptor: + type: object + properties: + name: + type: string + images: + type: array + items: + minItems: 1 + required: + - name + required: + - descriptor + - 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: + - type + - 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' + - 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 + 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/6' + - 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/7' + 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: + 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_CHARGE + 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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' + - $ref: '#/paths/~1on_init/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/~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/9' + - 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/10' + - $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/11' + - $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/13' + 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' + - 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/6' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7' + - $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/9' + - 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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' + - $ref: '#/paths/~1on_init/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/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/9' + - $ref: '#/paths/~1on_status/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' + 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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' + - $ref: '#/paths/~1on_init/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/~1confirm/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/9' + - $ref: '#/paths/~1on_status/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' + - 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.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
' + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + type: array + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + $ref: '#/components/schemas/Provider' + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' + properties: + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + bap_id: + allOf: + - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' + type: string + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: 'This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id.' + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: 'This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP.' + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: '^[+-]?([0-9]*[.])?[0-9]+' + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: 'Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network.' + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' + properties: + code: + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + type: string + message: + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment of an order. + items: + $ref: '#/components/schemas/Stop' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: 'A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment.' + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: '^[-+]?([1-8]?\d(\.\d{6,})?|90(\.0{6,})?),\s*[-+]?(180(\.0{6,})?|((1[0-7]\d)|([1-9]?\d))(\.\d{6,})?)$' + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
' + properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: object + Item: + additionalProperties: false + description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: 'ID of the item, this item is a variant of' + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: 'The price of this item, if it has intrinsic value' + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: 'The city this location is, or is located within' + country: + allOf: + - $ref: '#/components/schemas/Country' + description: 'The country this location is, or is located within' + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: 'The state this location is, or is located within' + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: 'The state this location is, or is located within' + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: 'This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level.' + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' + properties: + collected_by: + description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' + type: string + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment activity + type: string + virtual_payment_address: + type: string + type: object + status: + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + type: string + url: + description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' + format: uri + type: string + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: 'Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy' + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: 'The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable.' + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + $ref: '#/components/schemas/Price' + title: + type: string + type: object + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + ttl: + $ref: '#/components/schemas/Duration' + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + type: string + value: + description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' + type: string + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + properties: + boundary: + description: 'A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra.' + type: string + code: + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + type: string + dimensions: + description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region exists. + type: string + type: + description: 'The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network.' + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement' + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund.' + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + email: + format: email + type: string + phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + ref_id: + type: string + url: + format: uri + type: string + type: object + Tag: + additionalProperties: false + description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the Tag, can be used to store detailed information.' + display: + description: 'This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value.' + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the TagGroup, can be used to store detailed information.' + display: + default: true + description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' + type: boolean + list: + description: 'An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema.' + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: 'In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API.' + status: + description: 'This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order.' + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: 'A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data.' + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean + type: object diff --git a/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1.yaml b/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1.yaml new file mode 100644 index 0000000..ad958c5 --- /dev/null +++ b/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1.yaml @@ -0,0 +1,2828 @@ +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 + - $ref: "./example-rules/requests/search/search.yaml" + examples: + $ref: "./example-jsons/requests/search.yaml" + 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 + - $ref: "./example-rules/requests/select/select.yaml" + examples: + $ref: "./example-jsons/requests/select.yaml" + 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 + - $ref: "./example-rules/requests/init/init.yaml" + examples: + $ref: "./example-jsons/requests/init.yaml" + 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 + - $ref: "./example-rules/requests/confirm/confirm.yaml" + examples: + $ref: "./example-jsons/requests/confirm.yaml" + 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 + - $ref: "./example-rules/requests/status/status.yaml" + examples: + $ref: "./example-jsons/requests/status.yaml" + 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 + - $ref: "./example-rules/requests/update/update.yaml" + 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 + - $ref: "./example-rules/requests/rating/rating.yaml" + examples: + $ref: "./example-jsons/requests/rating.yaml" + 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 + - $ref: "./example-rules/requests/support/support.yaml" + examples: + $ref: "./example-jsons/requests/support.yaml" + 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 + - $ref: "./example-rules/requests/track/track.yaml" + examples: + $ref: "./example-jsons/requests/track.yaml" + 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 + - $ref: "./example-rules/requests/cancel/cancel.yaml" + examples: + $ref: "./example-jsons/requests/cancel.yaml" + 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 + - $ref: "./example-rules/responses/on_search/on_search.yaml" + examples: + $ref: "./example-jsons/responses/on_search.yaml" + 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 + - $ref: "./example-rules/responses/on_select/on_select.yaml" + examples: + $ref: "./example-jsons/responses/on_select.yaml" + 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 + - $ref: "./example-rules/responses/on_init/on_init.yaml" + examples: + $ref: "./example-jsons/responses/on_init.yaml" + 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 + - $ref: "example-rules/responses/on_confirm/on_confirm.yaml" + examples: + $ref: "./example-jsons/responses/on_confirm.yaml" + 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 + - $ref: "./example-rules/responses/on_status/on_status.yaml" + examples: + $ref: "./example-jsons/responses/on_status.yaml" + 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 + - $ref: "./example-rules/responses/on_update/on_update.yaml" + examples: + $ref: "./example-jsons/responses/on_update.yaml" + 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 + - $ref: "./example-rules/responses/on_rating/on_rating.yaml" + examples: + $ref: "./example-jsons/responses/on_rating.yaml" + 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 + - $ref: "./example-rules/responses/on_support/on_support.yaml" + examples: + $ref: "./example-jsons/responses/on_support.yaml" + 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 + - $ref: "./example-rules/responses/on_track/on_track.yaml" + examples: + $ref: "./example-jsons/responses/on_track.yaml" + 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 + - $ref: "./example-rules/responses/on_cancel/on_cancel.yaml" + examples: + $ref: "./example-jsons/responses/on_cancel.yaml" + 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.
  • This is typically + used in the discovery stage when the BPP sends the details of the products + and services it offers as response to a search intent from the BAP.
+ properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when + a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + type: array + offers: + description: Offers at the BPP-level. This is common across all providers + onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This + can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + $ref: '#/components/schemas/Provider' + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a + specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: Every API call in beckn protocol has a context. It provides a high-level + overview to the receiver about the nature of the intended transaction. Typically, + it is the BAP that sets the transaction context based on the consumer's location + and action on their UI. But sometimes, during unsolicited callbacks, the BPP + also sets the transaction context but it is usually the same as the context + of a previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields.
  1. Demographic + information about the transaction using fields like `domain`, `country`, and + `region`.
  2. Addressing details like the sending and receiving platform's + ID and API URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like the method + being called at the receiver's endpoint, the transaction_id that represents + an end-to-end user session at the BAP, a message ID to pair requests with + callbacks, a timestamp to capture sending times, a ttl to specifiy the validity + of the request, and a key to encrypt information if necessary.
This + object must be passed in every interaction between a BAP and a BPP. In HTTP/S + implementations, it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent during + all interactions, + properties: + action: + description: The Beckn protocol method being called by the sender and executed + at the receiver. + type: string + bap_id: + allOf: + - description: A globally unique identifier of the platform, Typically it + is the fully qualified domain name (FQDN) of the platform. + type: string + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily + contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: This is a unique value which persists during a request / callback + cycle. Since beckn protocol APIs are asynchronous, BAPs need a common + value to match an incoming callback from a BPP to an earlier call. This + value can also be used to ignore duplicate messages coming from the BPP. + It is recommended to generate a fresh message_id for every new interaction. + When sending unsolicited callbacks, BPPs must generate a new message_id. + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: This is a unique value which persists across all API calls + from `search` through `confirm`. This is done to indicate an active user + session across multiple requests. The BPPs can use this value to push + personalized recommendations, and dynamic offerings related to an ongoing + transaction despite being unaware of the user active on the BAP. + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this + message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: ^[+-]?([0-9]*[.])?[0-9]+ + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: Described the industry sector or sub-sector. The network policy + should contain codes for all the industry sectors supported by the network. + Domains can be created in varying levels of granularity. The granularity of + a domain can be decided by the participants of the network. Too broad domains + will result in irrelevant search broadcast calls to BPPs that don't have services + supporting the domain. Too narrow domains will result in a large number of + registry entries for each BPP. It is recommended that network facilitators + actively collaborate with various working groups and network participants + to carefully choose domain codes keeping in mind relevance, performance, and + opportunity cost. It is recommended that networks choose broad domains like + mobility, logistics, healthcare etc, and progressively granularize them as + and when the number of network participants for each domain grows large. + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: Standard code representing the domain. The standard is usually + published as part of the network policy. Furthermore, the network facilitator + should also provide a mechanism to provide the supported domains of a + network. + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: Describes an error object that is returned by a BAP, BPP or BG + as a response or callback to an action by another network participant. This + object is sent when any request received by a network participant is unacceptable. + This object can be sent either during Ack or with the callback. + properties: + code: + description: Standard error code. For full list of error codes, refer to + docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo" + type: string + message: + description: Human readable message describing the error. Used mainly for + logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during + json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received + by querying the url. MIME types are defined and standardized in IETF's + RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: The URL from where the form can be fetched. The content fetched + from the url must be processed as per the mime_type specified in this + object. Once fetched, the rendering platform can choosed to render the + form as-is as an embeddable element; or process it further to blend with + the theme of the application. In case the interface is non-visual, the + the render can process the form data and reproduce it as per the standard + specified in the form. + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the + order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on + a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value + whenever the state of the order fulfillment changes and fire an unsolicited + `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment + of an order. + items: + $ref: '#/components/schemas/Stop' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: A code that describes the mode of fulfillment. This is typically + set when there are multiple ways an order can be fulfilled. For example, + a retail order can be fulfilled either via store pickup or a home delivery. + Similarly, a medical consultation can be provided either in-person or + via tele-consultation. The network policy must publish standard fulfillment + type codes for the different modes of fulfillment. + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: ^[-+]?([1-8]?\d(\.\d{6,})?|90(\.0{6,})?),\s*[-+]?(180(\.0{6,})?|((1[0-7]\d)|([1-9]?\d))(\.\d{6,})?)$ + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default + dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: The intent to buy or avail a product or a service. The BAP can + declare the intent of the consumer containing
  • What they want (A product, + service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where + they want it and where they want it from
  • When they want it (start + and end time of fulfillment
  • How they want to pay for it

This + has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This + is typically used by the BAP to send the purpose of the user's search to the + BPP. This will be used by the BPP to find products or services it offers that + may match the user's intent.
For example, in Mobility, the mobility consumer + declares a mobility intent. In this case, the mobility consumer declares information + that describes various aspects of their journey like,
  • Where would they + like to begin their journey (intent.fulfillment.start.location)
  • Where + would they like to end their journey (intent.fulfillment.end.location)
  • When + would they like to begin their journey (intent.fulfillment.start.time)
  • When + would they like to end their journey (intent.fulfillment.end.time)
  • Who + is the transport service provider they would like to avail services from (intent.provider)
  • Who + is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What + kind of fare product would they like to purchase (intent.item)
  • What + add-on services would they like to avail
  • What offers would they like + to apply on their booking (intent.offer)
  • What category of services + would they like to avail (intent.category)
  • What additional luggage + are they carrying
  • How would they like to pay for their journey (intent.payment)

For + example, in health domain, a consumer declares the intent for a lab booking + the describes various aspects of their booking like,
  • Where would they + like to get their scan/test done (intent.fulfillment.start.location)
  • When + would they like to get their scan/test done (intent.fulfillment.start.time)
  • When + would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who + is the service provider they would like to avail services from (intent.provider)
  • Who + is getting the test/scan (intent.fulfillment.customer)
  • What kind of + test/scan would they like to purchase (intent.item)
  • What category + of services would they like to avail (intent.category)
  • How would they + like to pay for their journey (intent.payment)
+ properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: A raw description of the search intent. Free text search strings, + raw audio, etc can be sent in this object. + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the + order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: object + Item: + additionalProperties: false + description: Describes a product or a service offered to the end consumer by + the provider. In the mobility sector, it can represent a fare product like + one way journey. In the logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a product like a grocery item. + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: ID of the item, this item is a variant of + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple + of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The price of this item, if it has intrinsic value + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful + cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched + item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when + the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail + this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of + the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of + the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of + the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of + the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of + the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city this location is, or is located within + country: + allOf: + - $ref: '#/components/schemas/Country' + description: The country this location is, or is located within + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: The state this location is, or is located within + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally + recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state this location is, or is located within + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: indicates the nature and format of the document, file, or assortment + of bytes. MIME types are defined and standardized in IETF's RFC 6838 + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote + a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details + of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP + layer. The BPP can either generate order id within its system or forward + the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network + policy + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: This is used to indicate the type of order being created to + BPPs. Sometimes orders can be linked to previous orders, like a replacement + order in a retail domain. A follow-up consultation in healthcare domain. + A single order part of a subscription order. The list of order types can + be standardized at the network level. + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this + order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: Describes the terms of settlement between the BAP and the BPP for + a single transaction. When instantiated, this object contains
  1. the + amount that has to be settled,
  2. The payment destination destination + details
  3. When the settlement should happen, and
  4. A transaction + reference ID
. During a transaction, the BPP reserves the right to + decide the terms of payment. However, the BAP can send its terms to the BPP + first. If the BPP does not agree to those terms, it must overwrite the terms + and return them to the BAP. If overridden, the BAP must either agree to the + terms sent by the BPP in order to preserve the provider's autonomy, or abort + the transaction. In case of such disagreements, the BAP and the BPP can perform + offline negotiations on the payment terms. Once an agreement is reached, the + BAP and BPP can resume transactions. + properties: + collected_by: + description: This field indicates who is the collector of payment. The BAP + can set this value to 'bap' if it wants to collect the payment first and settle + it to the BPP. If the BPP agrees to those terms, the BPP should not send + the payment url. Alternatively, the BPP can set this field with the value + 'bpp' if it wants the payment to be made directly. + type: string + id: + description: ID of the payment term that can be referred at an item or an + order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment + activity + type: string + virtual_payment_address: + type: string + type: object + status: + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + type: string + url: + description: A payment url to be called by the BAP. If empty, then the payment + is to be done offline. The details of payment should be present in the + params object. If tl_method = http/get, then the payment details will + be sent as url params. Two url param values, ```$transaction_id``` and + ```$amount``` are mandatory. + format: uri + type: string + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: Gender of something, typically a Person, but possibly also + fictional characters, animals, etc. While Male and Female may be used, + text strings are also acceptable for people who do not identify as a binary + gender.Allowed values for this field can be published in the network policy + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: The time-to-live in seconds, for this object. This can be overriden + at deeper levels. A value of -1 indicates that this object is not cacheable. + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: Describes a quote. It is the estimated price of products or services + from the BPP.
This has properties like price, breakup, ttl + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + $ref: '#/components/schemas/Price' + title: + type: string + type: object + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + ttl: + $ref: '#/components/schemas/Duration' + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + type: string + value: + description: Rating value given to the object. This can be a single value + or can also contain an inequality operator like gt, gte, lt, lte. This + can also contain an inequality expression containing logical operators + like && and ||. + type: string + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should + contain a published list of supported regions by the network. + properties: + boundary: + description: A string representing the boundary of the region. One-dimensional + regions are represented by polylines. Two-dimensional regions are represented + by polygons, and three-dimensional regions can represented by polyhedra. + type: string + code: + description: A standard code representing the region. This should be interpreted + in the same way by all network participants. + type: string + dimensions: + description: The number of dimensions that are used to describe any point + inside that region. The most common dimensionality of a region is 2, that + represents an area on a map. There are regions on the map that can be + approximated to one-dimensional regions like roads, railway lines, or + shipping lines. 3 dimensional regions are rarer, but are gaining popularity + as flying drones are being adopted for various fulfillment services. + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized + map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region + exists. + type: string + type: + description: The type of region. This is used to specify the granularity + of the region represented by this object. Various examples of two-dimensional + region types are city, country, state, district, and so on. The network + policy should contain a list of all possible region types supported by + the network. + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to replace the item before a certain date-time, failing which they will + not be eligible for replacement + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned + to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to return the item to the origin before a certain date-time, failing which + they will not be eligible for refund. + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an + order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined + by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + email: + format: email + type: string + phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + ref_id: + type: string + url: + format: uri + type: string + type: object + Tag: + additionalProperties: false + description: Describes a tag. This is used to contain extended metadata. This + object can be added as a property to any schema to describe extended attributes. + For BAPs, tags can be sent during search to optimize and filter search results. + BPPs can use tags to index their catalog to allow better search functionality. + Tags are sent by the BPP as part of the catalog response in the `on_search` + callback. Tags are also meant for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value pairs. This is particularly useful + when rendering tabular information about a product or service. + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the Tag, can be used to store detailed information. + display: + description: This value indicates if the tag is intended for display purposes. + If set to `true`, then this tag must be displayed. If it is set to `false`, + it should not be displayed. This value can override the group display + value. + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is + by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: A collection of tag objects with group level attributes. For detailed + documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the TagGroup, can be used to store detailed + information. + display: + default: true + description: Indicates the display properties of the tag group. If display + is set to false, then the group will not be displayed. If it is set to + true, it should be displayed. However, group-level display properties + can be overriden by individual tag-level display property. As this schema + is purely for catalog display purposes, it is not recommended to send + this value during search. + type: boolean + list: + description: An array of Tag objects listed under this group. This property + can be set by BAPs during search to narrow the `search` and achieve more + relevant results. When received during `on_search`, BAPs must render this + list under the heading described by the `name` property of this schema. + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in + time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track + the fulfillment of an order in real-time. which is useful for knowing the + location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: In case there is no real-time tracking endpoint available, + this field will contain the latest location of the entity being tracked. + The BPP will update this value everytime the BAP calls the track API. + status: + description: This value indicates if the tracking is currently active or + not. If this value is `active`, then the BAP can begin tracking the order. + If this value is `inactive`, the tracking URL is considered to be expired + and the BAP should stop tracking the order. + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: A URL to the tracking endpoint. This can be a link to a tracking + webpage, a webhook URL created by the BAP where BPP can push the tracking + data, or a GET url creaed by the BPP which the BAP can poll to get the + tracking data. It can also be a websocket URL where the BPP can push real-time + tracking data. + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: Describes a vehicle is a device that is designed or used to transport + people or cargo over land, water, air, or through space.
This has properties + like category, capacity, make, model, size,variant,color,energy_type,registration + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: Contains any additional or extended inputs required to confirm + an order. This is typically a Form Input. Sometimes, selection of catalog + elements is not enough for the BPP to confirm an order. For example, to confirm + a flight ticket, the airline requires details of the passengers along with + information on baggage, identity, in addition to the class of ticket. Similarly, + a logistics company may require details on the nature of shipment in order + to confirm the shipping. A recruiting firm may require additional details + on the applicant in order to confirm a job application. For all such purposes, + the BPP can choose to send this object attached to any object in the catalog + that is required to be sent while placing the order. This object can typically + be sent at an item level or at the order level. The item level XInput will + override the Order level XInput as it indicates a special requirement of information + for that particular item. Hence the BAP must render a separate form for the + Item and another form at the Order level before confirmation. + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by + the BPP to confirm the order. + type: boolean + type: object + + From 225297e094a674f9bebcbd7e07a30e4225b49339 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 12 Sep 2024 20:18:36 +0530 Subject: [PATCH 11/12] minor changes in the l2 config --- .../responses/on_cancel/on_cancel.yaml | 1 + .../responses/on_confirm/on_confirm.yaml | 1 + .../responses/on_init/on_init.yaml | 1 + .../responses/on_search/on_search.yaml | 2 +- .../responses/on_search/provider_payment.yaml | 1 - .../responses/on_select/on_select.yaml | 1 + .../responses/on_status/on_status.yaml | 1 + .../responses/on_update/on_update.yaml | 1 + .../example-rules/shared-rules/bap_order.yaml | 2 +- .../fulfillment_with_type.yaml | 1 + .../fulfillment_rules/stops_auth.yaml | 1 + .../item_rules/fare_rules/required_tags.yaml | 82 +++++++ .../item_rules/info_rules/required_tags.yaml | 18 +- .../item_rules/required_tag_groups.yaml | 30 +++ .../payment_rules/payment_misc.yaml | 3 - .../shared-rules/quote_rules/base_rules.yaml | 3 +- api/l2-config/ONDC/final.yaml | 200 ++++++++++++++---- 17 files changed, 295 insertions(+), 54 deletions(-) create mode 100644 api/l2-config/ONDC/example-rules/shared-rules/item_rules/required_tag_groups.yaml diff --git a/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml b/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml index 131701f..74ebf9a 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_cancel/on_cancel.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml b/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml index 6c3908d..3237db4 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_confirm/on_confirm.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml b/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml index d4ed979..dcd0e56 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_init/on_init.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules_wo_agent.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml index 400c37f..72c8b2c 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_search/on_search.yaml @@ -3,7 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "./catalog_desc.yaml" - $ref: "./catalog_providers.yaml" - - $ref: "./provider_desc.yaml" + #- $ref: "./provider_desc.yaml" - $ref: "./provider_fulfillment.yaml" - $ref: "./provider_item.yaml" - $ref: "./provider_payment.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml b/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml index b0dc2bc..c4f1f6b 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_search/provider_payment.yaml @@ -17,7 +17,6 @@ properties: collected_by: type: string required: - - type - collected_by required: - payments diff --git a/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml b/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml index bcbd216..4120eb8 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_select/on_select.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_base_rules.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml b/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml index 62201fc..8c176ef 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_status/on_status.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml b/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml index 6c98cc1..bd2e244 100644 --- a/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml +++ b/api/l2-config/ONDC/example-rules/responses/on_update/on_update.yaml @@ -3,6 +3,7 @@ allOf: - $ref: "./action.yaml" - $ref: "../../shared-rules/provider_rule.yaml" - $ref: "../../shared-rules/item_rules/item_rules.yaml" + - $ref: "../../shared-rules/item_rules/required_tag_groups.yaml" - $ref: "../../shared-rules/item_rules/ids.yaml" - $ref: "../../shared-rules/fulfillment_rules/fulfillment_rules.yaml" - $ref: "../../shared-rules/fulfillment_rules/type_rule.yaml" diff --git a/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml b/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml index 2a3c112..6b90efd 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/bap_order.yaml @@ -1,4 +1,4 @@ -# describes BAP's view of a basic order. what we send in a request, select onwards. +# describes BAP's view of a basic order. what we send in a request select onwards. properties: message: properties: diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml index a13f178..a2ed52f 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/fulfillment_with_type.yaml @@ -1,3 +1,4 @@ +#used in callbacks prior to allOf: - $ref: "./fulfillment_base_rules.yaml" - $ref: "./type_rule.yaml" \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml index 3a19546..052f1f5 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/fulfillment_rules/stops_auth.yaml @@ -18,6 +18,7 @@ properties: type: string enum: - OTP + - QR token: type: string pattern: '^-?\d+(\.\d+)?$' diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml index 97dac6d..e05c0a9 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/fare_rules/required_tags.yaml @@ -31,6 +31,7 @@ properties: - code value: type: string + pattern: '^[0-9]+(\.[0-9]+)?$' required: - descriptor - value @@ -46,6 +47,87 @@ properties: - 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 diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml index 777a83b..71c4942 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/info_rules/required_tags.yaml @@ -31,7 +31,23 @@ properties: - code value: type: string - pattern: '^-?\d+(\.\d+)?$' + 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 \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/item_rules/required_tag_groups.yaml b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/required_tag_groups.yaml new file mode 100644 index 0000000..fc0c155 --- /dev/null +++ b/api/l2-config/ONDC/example-rules/shared-rules/item_rules/required_tag_groups.yaml @@ -0,0 +1,30 @@ + +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 + \ No newline at end of file diff --git a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml index bc02e62..081f85a 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/payment_rules/payment_misc.yaml @@ -32,9 +32,6 @@ properties: pattern: '^\d+(\.\d{1,2})?$' currency: type: string - required: - - amount - - currency required: - type - status diff --git a/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml index 435a9fc..73f4c51 100644 --- a/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml +++ b/api/l2-config/ONDC/example-rules/shared-rules/quote_rules/base_rules.yaml @@ -40,7 +40,8 @@ properties: - DISTANCE_FARE - TAX - DISCOUNT - - WAITING_CHARGE + - WAITING_CHARG + - CANCELLATION_CHARGES required: - price - title diff --git a/api/l2-config/ONDC/final.yaml b/api/l2-config/ONDC/final.yaml index 892605f..a18ad2a 100644 --- a/api/l2-config/ONDC/final.yaml +++ b/api/l2-config/ONDC/final.yaml @@ -593,7 +593,7 @@ paths: - 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/7' + - $ref: '#/paths/~1on_select/post/requestBody/content/application~1json/schema/allOf/1/allOf/8' - properties: message: properties: @@ -635,9 +635,6 @@ paths: pattern: '^\d+(\.\d{1,2})?$' currency: type: string - required: - - amount - - currency required: - type - status @@ -828,7 +825,7 @@ paths: - 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/5' + - $ref: '#/paths/~1on_select/post/requestBody/content/application~1json/schema/allOf/1/allOf/6' - properties: message: properties: @@ -971,6 +968,7 @@ paths: - code value: type: string + pattern: '^[0-9]+(\.[0-9]+)?$' required: - descriptor - value @@ -986,6 +984,87 @@ paths: - 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 @@ -1124,7 +1203,23 @@ paths: - code value: type: string - pattern: ^-?\d+(\.\d+)?$ + 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 @@ -2396,27 +2491,6 @@ paths: - id required: - providers - - properties: - message: - properties: - catalog: - properties: - providers: - items: - properties: - descriptor: - type: object - properties: - name: - type: string - images: - type: array - items: - minItems: 1 - required: - - name - required: - - descriptor - properties: message: properties: @@ -2516,7 +2590,6 @@ paths: collected_by: type: string required: - - type - collected_by required: - payments @@ -3659,6 +3732,7 @@ paths: - $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: @@ -3721,6 +3795,7 @@ paths: type: string enum: - OTP + - QR token: type: string pattern: ^-?\d+(\.\d+)?$ @@ -3791,7 +3866,7 @@ paths: - category required: - vehicle - - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/6' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/7' - properties: message: properties: @@ -3804,7 +3879,7 @@ paths: - not: 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' examples: Return a quote offered by a public transit service provider: value: @@ -4100,6 +4175,34 @@ paths: 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: @@ -4179,7 +4282,8 @@ paths: - DISTANCE_FARE - TAX - DISCOUNT - - WAITING_CHARGE + - WAITING_CHARG + - CANCELLATION_CHARGES required: - price - title @@ -4708,9 +4812,10 @@ paths: - $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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' - - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/6' + - $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: @@ -4724,7 +4829,7 @@ paths: - ACTIVE required: - status - - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/9' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10' - properties: message: properties: @@ -4739,10 +4844,10 @@ paths: - SOFT_CANCEL required: - status - - $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/10' - - $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/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: @@ -5195,6 +5300,7 @@ paths: - $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: @@ -5227,10 +5333,10 @@ paths: - person required: - agent - - $ref: '#/paths/~1on_init/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/9' + - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/10' - properties: message: properties: @@ -6324,15 +6430,16 @@ paths: - $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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' - - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/6' + - $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/9' - - $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/10' + - $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: @@ -7043,15 +7150,16 @@ paths: - $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_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/5' - - $ref: '#/paths/~1on_init/post/requestBody/content/application~1json/schema/allOf/1/allOf/6' + - $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/9' - - $ref: '#/paths/~1on_status/post/requestBody/content/application~1json/schema/allOf/1/allOf/10' + - $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: From a4a506ee929fd95f32cf8063049260e6a028df53 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 18 Sep 2024 13:29:04 +0530 Subject: [PATCH 12/12] l2 without examples --- api/l2-config/ONDC/final-no-example.yaml | 5109 +++++++++++++++++ ...andride_1.1.0_openapi_3.1-No-Examples.yaml | 2828 +++++++++ 2 files changed, 7937 insertions(+) create mode 100644 api/l2-config/ONDC/final-no-example.yaml create mode 100644 api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1-No-Examples.yaml diff --git a/api/l2-config/ONDC/final-no-example.yaml b/api/l2-config/ONDC/final-no-example.yaml new file mode 100644 index 0000000..3772d8a --- /dev/null +++ b/api/l2-config/ONDC/final-no-example.yaml @@ -0,0 +1,5109 @@ +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 + 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' + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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' + 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 + 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' + 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 + 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' + 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 + 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 + 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 + 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 + 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.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
' + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + type: array + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + $ref: '#/components/schemas/Provider' + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' + properties: + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + bap_id: + allOf: + - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' + type: string + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: 'This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id.' + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: 'This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP.' + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: '^[+-]?([0-9]*[.])?[0-9]+' + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: 'Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network.' + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' + properties: + code: + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + type: string + message: + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment of an order. + items: + $ref: '#/components/schemas/Stop' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: 'A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment.' + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: '^[-+]?([1-8]?\d(\.\d{6,})?|90(\.0{6,})?),\s*[-+]?(180(\.0{6,})?|((1[0-7]\d)|([1-9]?\d))(\.\d{6,})?)$' + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
' + properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: object + Item: + additionalProperties: false + description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: 'ID of the item, this item is a variant of' + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: 'The price of this item, if it has intrinsic value' + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: 'The city this location is, or is located within' + country: + allOf: + - $ref: '#/components/schemas/Country' + description: 'The country this location is, or is located within' + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: 'The state this location is, or is located within' + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: 'The state this location is, or is located within' + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: 'This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level.' + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' + properties: + collected_by: + description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' + type: string + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment activity + type: string + virtual_payment_address: + type: string + type: object + status: + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + type: string + url: + description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' + format: uri + type: string + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: 'Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy' + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: 'The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable.' + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + $ref: '#/components/schemas/Price' + title: + type: string + type: object + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + ttl: + $ref: '#/components/schemas/Duration' + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + type: string + value: + description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' + type: string + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + properties: + boundary: + description: 'A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra.' + type: string + code: + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + type: string + dimensions: + description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region exists. + type: string + type: + description: 'The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network.' + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement' + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: 'Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund.' + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + email: + format: email + type: string + phone: + pattern: '^\+?[1-9]\d{1,14}$' + type: string + ref_id: + type: string + url: + format: uri + type: string + type: object + Tag: + additionalProperties: false + description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the Tag, can be used to store detailed information.' + display: + description: 'This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value.' + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: 'Description of the TagGroup, can be used to store detailed information.' + display: + default: true + description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' + type: boolean + list: + description: 'An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema.' + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: 'In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API.' + status: + description: 'This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order.' + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: 'A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data.' + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean + type: object diff --git a/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1-No-Examples.yaml b/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1-No-Examples.yaml new file mode 100644 index 0000000..fc26941 --- /dev/null +++ b/api/l2-config/ONDC/mobility_ondemandride_1.1.0_openapi_3.1-No-Examples.yaml @@ -0,0 +1,2828 @@ +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 + - $ref: "./example-rules/requests/search/search.yaml" + # examples: + # $ref: "./example-jsons/requests/search.yaml" + 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 + - $ref: "./example-rules/requests/select/select.yaml" + # examples: + # $ref: "./example-jsons/requests/select.yaml" + 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 + - $ref: "./example-rules/requests/init/init.yaml" + # examples: + # $ref: "./example-jsons/requests/init.yaml" + 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 + - $ref: "./example-rules/requests/confirm/confirm.yaml" + # examples: + # $ref: "./example-jsons/requests/confirm.yaml" + 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 + - $ref: "./example-rules/requests/status/status.yaml" + # examples: + # $ref: "./example-jsons/requests/status.yaml" + 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 + - $ref: "./example-rules/requests/update/update.yaml" + 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 + - $ref: "./example-rules/requests/rating/rating.yaml" + # examples: + # $ref: "./example-jsons/requests/rating.yaml" + 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 + - $ref: "./example-rules/requests/support/support.yaml" + # examples: + # $ref: "./example-jsons/requests/support.yaml" + 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 + - $ref: "./example-rules/requests/track/track.yaml" + # examples: + # $ref: "./example-jsons/requests/track.yaml" + 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 + - $ref: "./example-rules/requests/cancel/cancel.yaml" + # examples: + # $ref: "./example-jsons/requests/cancel.yaml" + 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 + - $ref: "./example-rules/responses/on_search/on_search.yaml" + # examples: + # $ref: "./example-jsons/responses/on_search.yaml" + 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 + - $ref: "./example-rules/responses/on_select/on_select.yaml" + # examples: + # $ref: "./example-jsons/responses/on_select.yaml" + 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 + - $ref: "./example-rules/responses/on_init/on_init.yaml" + # examples: + # $ref: "./example-jsons/responses/on_init.yaml" + 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 + - $ref: "example-rules/responses/on_confirm/on_confirm.yaml" + # examples: + # $ref: "./example-jsons/responses/on_confirm.yaml" + 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 + - $ref: "./example-rules/responses/on_status/on_status.yaml" + # examples: + # $ref: "./example-jsons/responses/on_status.yaml" + 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 + - $ref: "./example-rules/responses/on_update/on_update.yaml" + # examples: + # $ref: "./example-jsons/responses/on_update.yaml" + 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 + - $ref: "./example-rules/responses/on_rating/on_rating.yaml" + # examples: + # $ref: "./example-jsons/responses/on_rating.yaml" + 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 + - $ref: "./example-rules/responses/on_support/on_support.yaml" + # examples: + # $ref: "./example-jsons/responses/on_support.yaml" + 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 + - $ref: "./example-rules/responses/on_track/on_track.yaml" + # examples: + # $ref: "./example-jsons/responses/on_track.yaml" + 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 + - $ref: "./example-rules/responses/on_cancel/on_cancel.yaml" + # examples: + # $ref: "./example-jsons/responses/on_cancel.yaml" + 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.
  • This is typically + used in the discovery stage when the BPP sends the details of the products + and services it offers as response to a search intent from the BAP.
+ properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Timestamp after which catalog will expire + format: date-time + type: string + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when + a BPP itself offers fulfillments on behalf of the providers it has onboarded. + items: + $ref: '#/components/schemas/Fulfillment' + type: array + offers: + description: Offers at the BPP-level. This is common across all providers + onboarded by the BPP. + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: Payment terms offered by the BPP for all transactions. This + can be overriden at the provider level. + items: + $ref: '#/components/schemas/Payment' + type: array + providers: + items: + $ref: '#/components/schemas/Provider' + type: array + ttl: + description: Duration in seconds after which this catalog will expire + type: string + type: object + Category: + additionalProperties: false + description: A label under which a collection of items can be grouped. + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + type: object + Circle: + additionalProperties: false + description: Describes a circular region of a specified radius centered at a + specified GPS coordinate. + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + type: object + City: + additionalProperties: false + description: Describes a city + properties: + code: + description: City code + type: string + name: + description: Name of the city + type: string + type: object + Contact: + additionalProperties: false + properties: + email: + type: string + jcard: + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + type: object + phone: + type: string + type: object + Context: + additionalProperties: false + description: Every API call in beckn protocol has a context. It provides a high-level + overview to the receiver about the nature of the intended transaction. Typically, + it is the BAP that sets the transaction context based on the consumer's location + and action on their UI. But sometimes, during unsolicited callbacks, the BPP + also sets the transaction context but it is usually the same as the context + of a previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields.
  1. Demographic + information about the transaction using fields like `domain`, `country`, and + `region`.
  2. Addressing details like the sending and receiving platform's + ID and API URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like the method + being called at the receiver's endpoint, the transaction_id that represents + an end-to-end user session at the BAP, a message ID to pair requests with + callbacks, a timestamp to capture sending times, a ttl to specifiy the validity + of the request, and a key to encrypt information if necessary.
This + object must be passed in every interaction between a BAP and a BPP. In HTTP/S + implementations, it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent during + all interactions, + properties: + action: + description: The Beckn protocol method being called by the sender and executed + at the receiver. + type: string + bap_id: + allOf: + - description: A globally unique identifier of the platform, Typically it + is the fully qualified domain name (FQDN) of the platform. + type: string + description: Subscriber ID of the BAP + bap_uri: + allOf: + - description: The callback URL of the Subscriber. This should necessarily + contain the same domain name as set in `subscriber_id``. + format: uri + type: string + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + bpp_id: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + description: Subscriber ID of the BPP + bpp_uri: + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + description: Subscriber URL of the BPP for accepting calls from BAPs. + domain: + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + description: Domain code that is relevant to this transaction context + key: + description: The encryption public key of the sender + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the transaction is intended to be fulfilled. + required: + - country + - city + message_id: + description: This is a unique value which persists during a request / callback + cycle. Since beckn protocol APIs are asynchronous, BAPs need a common + value to match an incoming callback from a BPP to an earlier call. This + value can also be used to ignore duplicate messages coming from the BPP. + It is recommended to generate a fresh message_id for every new interaction. + When sending unsolicited callbacks, BPPs must generate a new message_id. + format: uuid + type: string + timestamp: + description: Time of request generation in RFC3339 format + format: date-time + type: string + transaction_id: + description: This is a unique value which persists across all API calls + from `search` through `confirm`. This is done to indicate an active user + session across multiple requests. The BPPs can use this value to push + personalized recommendations, and dynamic offerings related to an ongoing + transaction despite being unaware of the user active on the BAP. + format: uuid + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this + message holds valid + type: string + version: + description: Version of transaction protocol being used by the sender. + type: string + type: object + Country: + additionalProperties: false + description: Describes a country. + properties: + code: + description: Country code as per ISO 3166-1 and ISO 3166-2 format + type: string + name: + description: Name of the country + type: string + type: object + Credential: + additionalProperties: false + description: Describes a credential of an entity - Person or Organization + properties: + id: + type: string + type: + default: VerifiableCredential + type: string + url: + description: URL of the credential + format: uri + type: string + type: object + Customer: + additionalProperties: false + description: Describes a customer buying/availing a product or a service + properties: + contact: + $ref: '#/components/schemas/Contact' + person: + $ref: '#/components/schemas/Person' + type: object + DecimalValue: + description: Describes a decimal value + pattern: ^[+-]?([0-9]*[.])?[0-9]+ + type: string + Descriptor: + additionalProperties: false + description: Physical description of something. + properties: + additional_desc: + properties: + content_type: + enum: + - text/plain + - text/html + - application/json + type: string + url: + type: string + type: object + code: + type: string + images: + items: + $ref: '#/components/schemas/Image' + type: array + long_desc: + type: string + media: + items: + $ref: '#/components/schemas/MediaFile' + type: array + name: + type: string + short_desc: + type: string + type: object + Domain: + additionalProperties: false + description: Described the industry sector or sub-sector. The network policy + should contain codes for all the industry sectors supported by the network. + Domains can be created in varying levels of granularity. The granularity of + a domain can be decided by the participants of the network. Too broad domains + will result in irrelevant search broadcast calls to BPPs that don't have services + supporting the domain. Too narrow domains will result in a large number of + registry entries for each BPP. It is recommended that network facilitators + actively collaborate with various working groups and network participants + to carefully choose domain codes keeping in mind relevance, performance, and + opportunity cost. It is recommended that networks choose broad domains like + mobility, logistics, healthcare etc, and progressively granularize them as + and when the number of network participants for each domain grows large. + properties: + additional_info: + allOf: + - $ref: '#/components/schemas/MediaFile' + description: A url that contains addtional information about that domain. + code: + description: Standard code representing the domain. The standard is usually + published as part of the network policy. Furthermore, the network facilitator + should also provide a mechanism to provide the supported domains of a + network. + type: string + name: + description: Name of the domain + type: string + type: object + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + additionalProperties: false + description: Describes an error object that is returned by a BAP, BPP or BG + as a response or callback to an action by another network participant. This + object is sent when any request received by a network participant is unacceptable. + This object can be sent either during Ack or with the callback. + properties: + code: + description: Standard error code. For full list of error codes, refer to + docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo" + type: string + message: + description: Human readable message describing the error. Used mainly for + logging. Not recommended to be shown to the user. + type: string + paths: + description: Path to json schema generating the error. Used only during + json schema validation errors + type: string + type: object + Fee: + additionalProperties: false + description: A fee applied on a particular entity + properties: + amount: + allOf: + - $ref: '#/components/schemas/Price' + description: A fixed value + percentage: + allOf: + - $ref: '#/components/schemas/DecimalValue' + description: Percentage of a value + type: object + Form: + additionalProperties: false + description: Describes a form + properties: + data: + additionalProperties: + type: string + description: The form submission data + type: object + mime_type: + description: This field indicates the nature and format of the form received + by querying the url. MIME types are defined and standardized in IETF's + RFC 6838. + enum: + - text/html + - application/xml + type: string + submission_id: + format: uuid + type: string + url: + description: The URL from where the form can be fetched. The content fetched + from the url must be processed as per the mime_type specified in this + object. Once fetched, the rendering platform can choosed to render the + form as-is as an embeddable element; or process it further to blend with + the theme of the application. In case the interface is non-visual, the + the render can process the form data and reproduce it as per the standard + specified in the form. + format: uri + type: string + type: object + Fulfillment: + additionalProperties: false + description: Describes how a an order will be rendered/fulfilled to the end-customer + properties: + agent: + allOf: + - $ref: '#/components/schemas/Agent' + description: The agent that is currently handling the fulfillment of the + order + contact: + $ref: '#/components/schemas/Contact' + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The person that will ultimately receive the order + id: + description: Unique reference ID to the fulfillment of an order + type: string + path: + description: The physical path taken by the agent that can be rendered on + a map. The allowed format of this property can be set by the network. + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating value of the fulfullment service. + state: + allOf: + - $ref: '#/components/schemas/FulfillmentState' + description: The current state of fulfillment. The BPP must set this value + whenever the state of the order fulfillment changes and fire an unsolicited + `on_status` call. + stops: + description: The list of logical stops encountered during the fulfillment + of an order. + items: + $ref: '#/components/schemas/Stop' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + tracking: + default: false + description: Indicates whether the fulfillment allows tracking + type: boolean + type: + description: A code that describes the mode of fulfillment. This is typically + set when there are multiple ways an order can be fulfilled. For example, + a retail order can be fulfilled either via store pickup or a home delivery. + Similarly, a medical consultation can be provided either in-person or + via tele-consultation. The network policy must publish standard fulfillment + type codes for the different modes of fulfillment. + type: string + vehicle: + $ref: '#/components/schemas/Vehicle' + type: object + FulfillmentState: + additionalProperties: false + description: Describes the state of fulfillment + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + updated_at: + format: date-time + type: string + updated_by: + description: ID of entity which changed the state + type: string + type: object + Gps: + description: Describes a gps coordinate + pattern: ^[-+]?([1-8]?\d(\.\d{6,})?|90(\.0{6,})?),\s*[-+]?(180(\.0{6,})?|((1[0-7]\d)|([1-9]?\d))(\.\d{6,})?)$ + type: string + Image: + additionalProperties: false + description: Describes an image + properties: + height: + description: Height of the image in pixels + type: string + size_type: + description: The size of the image. The network policy can define the default + dimensions of each type + enum: + - xs + - sm + - md + - lg + - xl + - custom + type: string + url: + description: URL to the image. This can be a data url or an remote url + format: uri + type: string + width: + description: Width of the image in pixels + type: string + required: + - url + type: object + Intent: + additionalProperties: false + description: The intent to buy or avail a product or a service. The BAP can + declare the intent of the consumer containing
  • What they want (A product, + service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where + they want it and where they want it from
  • When they want it (start + and end time of fulfillment
  • How they want to pay for it

This + has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This + is typically used by the BAP to send the purpose of the user's search to the + BPP. This will be used by the BPP to find products or services it offers that + may match the user's intent.
For example, in Mobility, the mobility consumer + declares a mobility intent. In this case, the mobility consumer declares information + that describes various aspects of their journey like,
  • Where would they + like to begin their journey (intent.fulfillment.start.location)
  • Where + would they like to end their journey (intent.fulfillment.end.location)
  • When + would they like to begin their journey (intent.fulfillment.start.time)
  • When + would they like to end their journey (intent.fulfillment.end.time)
  • Who + is the transport service provider they would like to avail services from (intent.provider)
  • Who + is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What + kind of fare product would they like to purchase (intent.item)
  • What + add-on services would they like to avail
  • What offers would they like + to apply on their booking (intent.offer)
  • What category of services + would they like to avail (intent.category)
  • What additional luggage + are they carrying
  • How would they like to pay for their journey (intent.payment)

For + example, in health domain, a consumer declares the intent for a lab booking + the describes various aspects of their booking like,
  • Where would they + like to get their scan/test done (intent.fulfillment.start.location)
  • When + would they like to get their scan/test done (intent.fulfillment.start.time)
  • When + would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who + is the service provider they would like to avail services from (intent.provider)
  • Who + is getting the test/scan (intent.fulfillment.customer)
  • What kind of + test/scan would they like to purchase (intent.item)
  • What category + of services would they like to avail (intent.category)
  • How would they + like to pay for their journey (intent.payment)
+ properties: + category: + allOf: + - $ref: '#/components/schemas/Category' + description: Details on the item category + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: A raw description of the search intent. Free text search strings, + raw audio, etc can be sent in this object. + fulfillment: + allOf: + - $ref: '#/components/schemas/Fulfillment' + description: Details on how the customer wants their order fulfilled + item: + allOf: + - $ref: '#/components/schemas/Item' + description: Details of the item that the consumer wants to order + offer: + allOf: + - $ref: '#/components/schemas/Offer' + description: details on the offer the customer wants to avail + payment: + allOf: + - $ref: '#/components/schemas/Payment' + description: Details on how the customer wants to pay for the order + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: The provider from which the customer wants to place to the + order from + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: object + Item: + additionalProperties: false + description: Describes a product or a service offered to the end consumer by + the provider. In the mobility sector, it can represent a fare product like + one way journey. In the logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a product like a grocery item. + properties: + add_ons: + items: + $ref: '#/components/schemas/AddOn' + type: array + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + category_ids: + description: Categories this item can be listed under + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + type: array + creator: + allOf: + - $ref: '#/components/schemas/Organization' + description: The creator of this item + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Physical description of the item + fulfillment_ids: + description: Modes through which this item can be fulfilled + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + type: array + id: + description: ID of the item. + type: string + location_ids: + description: Provider Locations this item is available in + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + type: array + matched: + description: Whether this item is an exact match of the request + type: boolean + parent_item_id: + allOf: + - $ref: '#/components/schemas/Item/properties/id' + description: ID of the item, this item is a variant of + parent_item_quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The number of units of the parent item this item is a multiple + of + payment_ids: + description: Payment modalities through which this item can be ordered + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + type: array + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The price of this item, if it has intrinsic value + quantity: + allOf: + - $ref: '#/components/schemas/ItemQuantity' + description: The selling quantity of the item + rateable: + description: Whether this item can be rated + type: boolean + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of the item + recommended: + description: Whether this item is a recommended item to a response + type: boolean + refund_terms: + description: Refund terms of this item + items: + description: Refund term of an item or an order + properties: + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + refund_amount: + $ref: '#/components/schemas/Price' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Time within which refund will be processed after successful + cancellation. + type: object + type: array + related: + description: Whether this item is a related item to the exactly matched + item + type: boolean + replacement_terms: + description: Terms that are applicable be met when this item is replaced + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Terms that are applicable when this item is returned + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Temporal attributes of this item. This property is used when + the item exists on the catalog only for a limited period of time. + ttl: + description: Time to live in seconds for an instance of this schema + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to purchase / avail + this item + type: object + ItemQuantity: + additionalProperties: false + description: Describes the count or amount of an item + properties: + allocated: + description: This represents the exact quantity allocated for purchase of + the item. + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + available: + description: This represents the exact quantity available for purchase of + the item. The buyer can only purchase multiples of this + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + maximum: + description: This represents the maximum quantity allowed for purchase of + the item + properties: + count: + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + minimum: + description: This represents the minimum quantity allowed for purchase of + the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + selected: + description: This represents the quantity selected for purchase of the item + properties: + count: + minimum: 0 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + unitized: + description: This represents the quantity available in a single unit of + the item + properties: + count: + maximum: 1 + minimum: 1 + type: integer + measure: + $ref: '#/components/schemas/Scalar' + type: object + type: object + Location: + additionalProperties: false + description: The physical location of something + properties: + 3dspace: + description: The three dimensional region describing this location + type: string + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The address of this location. + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city this location is, or is located within + country: + allOf: + - $ref: '#/components/schemas/Country' + description: The country this location is, or is located within + descriptor: + $ref: '#/components/schemas/Descriptor' + district: + description: The state this location is, or is located within + type: string + gps: + allOf: + - $ref: '#/components/schemas/Gps' + description: The GPS co-ordinates of this location. + id: + type: string + map_url: + description: The url to the map of the location. This can be a globally + recognized map url or the one specified by the network policy. + format: uri + type: string + polygon: + description: The boundary polygon of this location + type: string + rating: + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + description: The rating of this location + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state this location is, or is located within + type: object + MediaFile: + additionalProperties: false + description: This object contains a url to a media file. + properties: + dsa: + description: The signing algorithm used by the sender + type: string + mimetype: + description: indicates the nature and format of the document, file, or assortment + of bytes. MIME types are defined and standardized in IETF's RFC 6838 + type: string + signature: + description: The digital signature of the file signed by the sender + type: string + url: + description: The URL of the file + format: uri + type: string + type: object + Offer: + additionalProperties: false + description: An offer associated with a catalog. This is typically used to promote + a particular product and enable more purchases. + properties: + category_ids: + items: + $ref: '#/components/schemas/Category/properties/id' + type: array + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + item_ids: + items: + $ref: '#/components/schemas/Item/properties/id' + type: array + location_ids: + items: + $ref: '#/components/schemas/Location/properties/id' + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: object + Option: + additionalProperties: false + description: Describes a selectable option + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + id: + type: string + type: object + Order: + additionalProperties: false + description: Describes a legal purchase order. It contains the complete details + of the legal contract created between the buyer and the seller. + properties: + add_ons: + description: The add-ons purchased / availed in this order + items: + $ref: '#/components/schemas/AddOn' + type: array + billing: + allOf: + - $ref: '#/components/schemas/Billing' + description: The billing details of this order + cancellation: + allOf: + - $ref: '#/components/schemas/Cancellation' + description: The cancellation details of this order + cancellation_terms: + description: Cancellation terms of this item + items: + $ref: '#/components/schemas/CancellationTerm' + type: array + created_at: + description: The date-time of creation of this order + format: date-time + type: string + fulfillments: + description: The fulfillments involved in completing this order + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Human-readable ID of the order. This is generated at the BPP + layer. The BPP can either generate order id within its system or forward + the order ID created at the provider level. + type: string + items: + description: The items purchased / availed in this order + items: + $ref: '#/components/schemas/Item' + type: array + offers: + description: The offers applied in this order + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + description: The terms of settlement for this order + items: + $ref: '#/components/schemas/Payment' + type: array + provider: + allOf: + - $ref: '#/components/schemas/Provider' + description: Details of the provider whose catalog items have been selected. + quote: + allOf: + - $ref: '#/components/schemas/Quotation' + description: The mutually agreed upon quotation for this order. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + items: + description: ID of a previous order + type: string + type: array + refund_terms: + description: Refund terms of this item + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + type: array + replacement_terms: + description: Replacement terms of this item + items: + $ref: '#/components/schemas/ReplacementTerm' + type: array + return_terms: + description: Return terms of this item + items: + $ref: '#/components/schemas/ReturnTerm' + type: array + status: + description: Status of the order. Allowed values can be defined by the network + policy + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + type: + default: DEFAULT + description: This is used to indicate the type of order being created to + BPPs. Sometimes orders can be linked to previous orders, like a replacement + order in a retail domain. A follow-up consultation in healthcare domain. + A single order part of a subscription order. The list of order types can + be standardized at the network level. + enum: + - DRAFT + - DEFAULT + type: string + updated_at: + description: The date-time of updated of this order + format: date-time + type: string + xinput: + allOf: + - $ref: '#/components/schemas/XInput' + description: Additional input required from the customer to confirm this + order + type: object + Organization: + additionalProperties: false + description: An organization. Usually a recognized business entity. + properties: + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The postal address of the organization + city: + allOf: + - $ref: '#/components/schemas/City' + description: The city where the the organization's address is registered + contact: + $ref: '#/components/schemas/Contact' + descriptor: + $ref: '#/components/schemas/Descriptor' + state: + allOf: + - $ref: '#/components/schemas/State' + description: The state where the organization's address is registered + type: object + Payment: + additionalProperties: false + description: Describes the terms of settlement between the BAP and the BPP for + a single transaction. When instantiated, this object contains
  1. the + amount that has to be settled,
  2. The payment destination destination + details
  3. When the settlement should happen, and
  4. A transaction + reference ID
. During a transaction, the BPP reserves the right to + decide the terms of payment. However, the BAP can send its terms to the BPP + first. If the BPP does not agree to those terms, it must overwrite the terms + and return them to the BAP. If overridden, the BAP must either agree to the + terms sent by the BPP in order to preserve the provider's autonomy, or abort + the transaction. In case of such disagreements, the BAP and the BPP can perform + offline negotiations on the payment terms. Once an agreement is reached, the + BAP and BPP can resume transactions. + properties: + collected_by: + description: This field indicates who is the collector of payment. The BAP + can set this value to 'bap' if it wants to collect the payment first and settle + it to the BPP. If the BPP agrees to those terms, the BPP should not send + the payment url. Alternatively, the BPP can set this field with the value + 'bpp' if it wants the payment to be made directly. + type: string + id: + description: ID of the payment term that can be referred at an item or an + order level in a catalog + type: string + params: + properties: + amount: + type: string + bank_account_number: + type: string + bank_code: + type: string + currency: + type: string + source_bank_account_number: + type: string + source_bank_code: + type: string + source_virtual_payment_address: + type: string + transaction_id: + description: The reference transaction ID associated with a payment + activity + type: string + virtual_payment_address: + type: string + type: object + status: + type: string + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + type: + type: string + url: + description: A payment url to be called by the BAP. If empty, then the payment + is to be done offline. The details of payment should be present in the + params object. If tl_method = http/get, then the payment details will + be sent as url params. Two url param values, ```$transaction_id``` and + ```$amount``` are mandatory. + format: uri + type: string + type: object + Person: + additionalProperties: false + description: Describes a person as any individual + properties: + age: + allOf: + - $ref: '#/components/schemas/Duration' + description: Age of the person + creds: + items: + $ref: '#/components/schemas/Credential' + type: array + dob: + description: Date of birth of the person + format: date + type: string + gender: + description: Gender of something, typically a Person, but possibly also + fictional characters, animals, etc. While Male and Female may be used, + text strings are also acceptable for people who do not identify as a binary + gender.Allowed values for this field can be published in the network policy + type: string + id: + description: Describes the identity of the person + type: string + image: + $ref: '#/components/schemas/Image' + languages: + items: + description: Describes a language known to the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + name: + description: the name of the person + type: string + skills: + items: + description: Describes a skill of the person. + properties: + code: + type: string + name: + type: string + type: object + type: array + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + url: + description: Profile url of the person + format: uri + type: string + type: object + Price: + additionalProperties: false + description: Describes the price of an item. Allows for domain extension. + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + currency: + type: string + estimated_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Provider: + additionalProperties: false + description: Describes the catalog of a business. + properties: + categories: + items: + $ref: '#/components/schemas/Category' + type: array + category_id: + description: Category Id of the provider at the BPP-level catalog + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + exp: + description: Time after which catalog has to be refreshed + format: date-time + type: string + fulfillments: + items: + $ref: '#/components/schemas/Fulfillment' + type: array + id: + description: Id of the provider + type: string + items: + items: + $ref: '#/components/schemas/Item' + type: array + locations: + items: + $ref: '#/components/schemas/Location' + type: array + offers: + items: + $ref: '#/components/schemas/Offer' + type: array + payments: + items: + $ref: '#/components/schemas/Payment' + type: array + rateable: + description: Whether this provider can be rated or not + type: boolean + rating: + $ref: '#/components/schemas/Rating/properties/value' + tags: + items: + $ref: '#/components/schemas/TagGroup' + type: array + time: + $ref: '#/components/schemas/Time' + ttl: + description: The time-to-live in seconds, for this object. This can be overriden + at deeper levels. A value of -1 indicates that this object is not cacheable. + minimum: -1 + type: integer + type: object + Quotation: + additionalProperties: false + description: Describes a quote. It is the estimated price of products or services + from the BPP.
This has properties like price, breakup, ttl + properties: + breakup: + description: the breakup of the total quoted price + items: + properties: + item: + $ref: '#/components/schemas/Item' + price: + $ref: '#/components/schemas/Price' + title: + type: string + type: object + type: array + id: + description: ID of the quote. + format: uuid + type: string + price: + allOf: + - $ref: '#/components/schemas/Price' + description: The total quoted price + ttl: + $ref: '#/components/schemas/Duration' + type: object + Rating: + additionalProperties: false + description: Describes the rating of an entity + properties: + id: + description: Id of the object being rated + type: string + rating_category: + description: Category of the entity being rated + type: string + value: + description: Rating value given to the object. This can be a single value + or can also contain an inequality operator like gt, gte, lt, lte. This + can also contain an inequality expression containing logical operators + like && and ||. + type: string + type: object + Region: + additionalProperties: false + description: Describes an arbitrary region of space. The network policy should + contain a published list of supported regions by the network. + properties: + boundary: + description: A string representing the boundary of the region. One-dimensional + regions are represented by polylines. Two-dimensional regions are represented + by polygons, and three-dimensional regions can represented by polyhedra. + type: string + code: + description: A standard code representing the region. This should be interpreted + in the same way by all network participants. + type: string + dimensions: + description: The number of dimensions that are used to describe any point + inside that region. The most common dimensionality of a region is 2, that + represents an area on a map. There are regions on the map that can be + approximated to one-dimensional regions like roads, railway lines, or + shipping lines. 3 dimensional regions are rarer, but are gaining popularity + as flying drones are being adopted for various fulfillment services. + enum: + - '1' + - '2' + - '3' + type: string + map_url: + description: The url to the map of the region. This can be a globally recognized + map or the one specified by the network policy. + type: string + name: + description: Name of the region as specified on the map where that region + exists. + type: string + type: + description: The type of region. This is used to specify the granularity + of the region represented by this object. Various examples of two-dimensional + region types are city, country, state, district, and so on. The network + policy should contain a list of all possible region types supported by + the network. + type: string + type: object + ReplacementTerm: + additionalProperties: false + description: The replacement policy of an item or an order + properties: + external_ref: + $ref: '#/components/schemas/MediaFile' + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term is applicable. + replace_within: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to replace the item before a certain date-time, failing which they will + not be eligible for replacement + type: object + ReturnTerm: + additionalProperties: false + description: Describes the return policy of an item or an order + properties: + fulfillment_managed_by: + description: The entity that will perform the return + type: string + fulfillment_state: + allOf: + - $ref: '#/components/schemas/State' + description: The state of fulfillment during which this term IETF''s applicable. + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_location: + allOf: + - $ref: '#/components/schemas/Location' + description: The location where the item or order must / will be returned + to + return_time: + allOf: + - $ref: '#/components/schemas/Time' + description: Applicable only for buyer managed returns where the buyer has + to return the item to the origin before a certain date-time, failing which + they will not be eligible for refund. + type: object + Scalar: + additionalProperties: false + description: Describes a scalar + properties: + computed_value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + range: + properties: + max: + $ref: '#/components/schemas/DecimalValue' + min: + $ref: '#/components/schemas/DecimalValue' + type: object + type: + enum: + - CONSTANT + - VARIABLE + type: string + unit: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + type: object + Schedule: + additionalProperties: false + description: Describes a schedule + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + items: + format: date-time + type: string + type: array + times: + items: + format: date-time + type: string + type: array + type: object + State: + additionalProperties: false + description: A bounded geopolitical region of governance inside a country. + properties: + code: + description: State code as per country or international standards + type: string + name: + description: Name of the state + type: string + type: object + Stop: + additionalProperties: false + description: A logical point in space and time during the fulfillment of an + order. + properties: + authorization: + $ref: '#/components/schemas/Authorization' + contact: + allOf: + - $ref: '#/components/schemas/Contact' + description: Contact details of the stop + id: + type: string + instructions: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Instructions that need to be followed at the stop + location: + allOf: + - $ref: '#/components/schemas/Location' + description: Location of the stop + parent_stop_id: + type: string + person: + allOf: + - $ref: '#/components/schemas/Person' + description: The details of the person present at the stop + time: + allOf: + - $ref: '#/components/schemas/Time' + description: Timings applicable at the stop. + type: + description: The type of stop. Allowed values of this property can be defined + by the network policy. + enum: + - START + - END + type: string + type: object + Support: + additionalProperties: false + description: Details of customer support + properties: + callback_phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + email: + format: email + type: string + phone: + pattern: ^\+?[1-9]\d{1,14}$ + type: string + ref_id: + type: string + url: + format: uri + type: string + type: object + Tag: + additionalProperties: false + description: Describes a tag. This is used to contain extended metadata. This + object can be added as a property to any schema to describe extended attributes. + For BAPs, tags can be sent during search to optimize and filter search results. + BPPs can use tags to index their catalog to allow better search functionality. + Tags are sent by the BPP as part of the catalog response in the `on_search` + callback. Tags are also meant for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value pairs. This is particularly useful + when rendering tabular information about a product or service. + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the Tag, can be used to store detailed information. + display: + description: This value indicates if the tag is intended for display purposes. + If set to `true`, then this tag must be displayed. If it is set to `false`, + it should not be displayed. This value can override the group display + value. + type: boolean + value: + description: The value of the tag. This set by the BPP and rendered as-is + by the BAP. + type: string + type: object + TagGroup: + additionalProperties: false + description: A collection of tag objects with group level attributes. For detailed + documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + description: Description of the TagGroup, can be used to store detailed + information. + display: + default: true + description: Indicates the display properties of the tag group. If display + is set to false, then the group will not be displayed. If it is set to + true, it should be displayed. However, group-level display properties + can be overriden by individual tag-level display property. As this schema + is purely for catalog display purposes, it is not recommended to send + this value during search. + type: boolean + list: + description: An array of Tag objects listed under this group. This property + can be set by BAPs during search to narrow the `search` and achieve more + relevant results. When received during `on_search`, BAPs must render this + list under the heading described by the `name` property of this schema. + items: + $ref: '#/components/schemas/Tag' + type: array + type: object + Time: + additionalProperties: false + description: Describes time in its various forms. It can be a single point in + time; duration; or a structured timetable of operations + properties: + days: + description: comma separated values representing days of the week + type: string + duration: + $ref: '#/components/schemas/Duration' + label: + type: string + range: + properties: + end: + format: date-time + type: string + start: + format: date-time + type: string + type: object + schedule: + $ref: '#/components/schemas/Schedule' + timestamp: + format: date-time + type: string + type: object + Tracking: + additionalProperties: false + description: Contains tracking information that can be used by the BAP to track + the fulfillment of an order in real-time. which is useful for knowing the + location of time sensitive deliveries. + properties: + id: + description: A unique tracking reference number + type: string + location: + allOf: + - $ref: '#/components/schemas/Location' + description: In case there is no real-time tracking endpoint available, + this field will contain the latest location of the entity being tracked. + The BPP will update this value everytime the BAP calls the track API. + status: + description: This value indicates if the tracking is currently active or + not. If this value is `active`, then the BAP can begin tracking the order. + If this value is `inactive`, the tracking URL is considered to be expired + and the BAP should stop tracking the order. + enum: + - ACTIVE + - INACTIVE + type: string + url: + description: A URL to the tracking endpoint. This can be a link to a tracking + webpage, a webhook URL created by the BAP where BPP can push the tracking + data, or a GET url creaed by the BPP which the BAP can poll to get the + tracking data. It can also be a websocket URL where the BPP can push real-time + tracking data. + format: uri + type: string + type: object + Vehicle: + additionalProperties: false + description: Describes a vehicle is a device that is designed or used to transport + people or cargo over land, water, air, or through space.
This has properties + like category, capacity, make, model, size,variant,color,energy_type,registration + properties: + capacity: + type: integer + cargo_volumne: + type: string + category: + type: string + code: + type: string + color: + type: string + emission_standard: + type: string + energy_type: + type: string + make: + type: string + model: + type: string + registration: + type: string + size: + type: string + variant: + type: string + wheelchair_access: + type: string + wheels_count: + type: string + type: object + XInput: + additionalProperties: false + description: Contains any additional or extended inputs required to confirm + an order. This is typically a Form Input. Sometimes, selection of catalog + elements is not enough for the BPP to confirm an order. For example, to confirm + a flight ticket, the airline requires details of the passengers along with + information on baggage, identity, in addition to the class of ticket. Similarly, + a logistics company may require details on the nature of shipment in order + to confirm the shipping. A recruiting firm may require additional details + on the applicant in order to confirm a job application. For all such purposes, + the BPP can choose to send this object attached to any object in the catalog + that is required to be sent while placing the order. This object can typically + be sent at an item level or at the order level. The item level XInput will + override the Order level XInput as it indicates a special requirement of information + for that particular item. Hence the BAP must render a separate form for the + Item and another form at the Order level before confirmation. + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by + the BPP to confirm the order. + type: boolean + type: object + +