Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 74 additions & 16 deletions api/beckn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ paths:
application/json:
schema:
type: object
required: [context, message]
required: [context]
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -308,6 +311,8 @@ paths:
minItems: 1
items:
$ref: "https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Offer"
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -360,7 +365,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -376,6 +383,8 @@ paths:
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -428,7 +437,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -444,6 +455,8 @@ paths:
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -496,7 +509,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -512,6 +527,8 @@ paths:
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -571,7 +588,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -582,13 +601,13 @@ paths:
const: on_status
message:
type: object
required:
- order
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
anyOf:
- required:
- order
- required: []
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -641,7 +660,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -657,6 +678,8 @@ paths:
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -733,7 +756,9 @@ paths:
type: object
required:
- context
- message
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -749,6 +774,8 @@ paths:
properties:
order:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Order'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -801,7 +828,11 @@ paths:
application/json:
schema:
type: object
required: [context, message]
required:
- context
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -816,6 +847,8 @@ paths:
properties:
support:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/SupportInfo'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -882,7 +915,11 @@ paths:
application/json:
schema:
type: object
required: [context, message]
required:
- context
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -897,6 +934,8 @@ paths:
properties:
tracking:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Tracking'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -940,7 +979,11 @@ paths:
application/json:
schema:
type: object
required: [context, message]
required:
- context
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand Down Expand Up @@ -974,6 +1017,8 @@ paths:
feedbackForm:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Form'
description: Optional feedback form for additional detailed feedback collection
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
responses:
'200':
$ref: '#/components/responses/Ack200'
Expand Down Expand Up @@ -1118,7 +1163,11 @@ components:
- required: [filters, spatial]
DiscoverResponse:
type: object
required: [context, message]
required:
- context
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -1136,6 +1185,9 @@ components:
description: Array of catalogs containing items
items:
$ref: '#/components/schemas/Catalog'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'

DiscoveryContext:
allOf:
- $ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications/refs/heads/master/api/transaction/build/transaction.yaml#/components/schemas/Context'
Expand Down Expand Up @@ -1454,7 +1506,11 @@ components:
*context.version* MUST indicate the supported protocol version (e.g., "2.0.0").
CatalogPublishResponse:
type: object
required: [context, results]
required:
- context
oneOf:
- required: [message]
- required: [error]
properties:
context:
allOf:
Expand All @@ -1472,6 +1528,8 @@ components:
description: Per-catalog processing results
items:
$ref: '#/components/schemas/CatalogProcessingResult'
error:
$ref: 'https://raw.githubusercontent.com/beckn/protocol-specifications-new/refs/heads/main/schema/core/v2/attributes.yaml#/components/schemas/Error'
# ---------- Result model ----------
CatalogProcessingResult:
type: object
Expand Down