-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbeckn.yaml
More file actions
3339 lines (3044 loc) · 114 KB
/
beckn.yaml
File metadata and controls
3339 lines (3044 loc) · 114 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.1
info:
title: Beckn Protocol API
description: "The Beckn Protocol API Specification v2.0 — a concrete, developer-friendly OpenAPI 3.1.1\nspecification with one named path per Beckn protocol action.\n\n## Design Philosophy\n- **Minimalism**: Transport-layer schemas are inline. All data-model schemas\n (Catalog, Contract, Intent, etc.) are resolved from #/components/schemas.\n\n## Typical Transaction Lifecycle\n```\ndiscover → on_discover\nselect → on_select → init → on_init → confirm → on_confirm\n→ [status / on_status]* → [update / on_update]* → [cancel / on_cancel]?\n→ [track / on_track]* → rate / on_rate → support / on_support\n```\n\n## `context.try` — Sandbox Mode\nThe `try` flag on the `Context` object (defined in `#/components/schemas/Context`)\nindicates sandbox mode on the network participant:\n- `context.try: true` — test consequences without changing state.\n- `context.try: false` (default) — commit the action.\nThis pattern is applicable to `update`, `cancel`, `rate`, and `support` actions.\n\n## Authentication\n\
All requests MUST carry a valid Beckn HTTP Signature in the `Authorization` header.\nThe `Ack` response body MUST carry a `CounterSignature` proving receipt.\nSee `api/v2.0.0/README.md` for implementation notes aligned to this specification.\n\n## Scope\nThis specification is designed for interoperability across value-exchange use cases:\nretail, mobility, logistics, energy, healthcare, skilling, financial services,\ncarbon trading, hiring, data licensing, and other domains built on Beckn."
version: 2.0.0
contact:
name: Beckn Protocol
url: https://beckn.io
license:
name: CC-BY-NC-SA 4.0 International
url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en
tags:
- name: Discovery
description: Discover catalogs across a Beckn network
- name: Transaction
description: Select, negotiate, confirm and manage contracts
- name: Fulfillment
description: Track, update and cancel active contracts
- name: Post-Fulfillment
description: Rate and support completed contracts
- name: Catalog Publishing
description: Publish catalogs to a Catalog Discovery Service (CDS)
- name: Subscription
description: 'Beckn v2.0 catalog subscription management.
Subscriptions determine which networks and schema types a BAP receives
`on_discover` callbacks for. Only `ACTIVE` subscriptions are matched
during evaluation.
'
- name: Catalog Pull
description: 'Async catalog pull API hosted on the Catalog Indexer Job.
The BAP POSTs a pull request and receives an immediate ACK with a `requestId`.
The actual catalog data is delivered asynchronously via HTTP callback to
`{bapUri}/on_catalog_pull`.
Two delivery modes:
- **FULL** — latest version of each matching catalog
- **INCREMENTAL** — all versions within a date range (`fromDate`/`toDate`)
Large payloads exceeding the configured inline threshold are written to disk
and served via `GET /catalog/pull/result/{requestId}/catalogs.json`; the
callback''s `objectUrl` field carries the download URL and `sha256` checksum.
'
- name: Master Resource Search
description: 'Query APIs for master catalog items stored in the Catalog Indexer git
repository. All endpoints return a Beckn v2.0 response envelope with
`action: "on_catalog_master_search"`.
'
security: []
servers:
- url: https://{subscriberUrl}
description: Base URL of the Beckn network participant endpoint. Implementations MUST substitute `{subscriberUrl}` with the actual registered subscriber URL obtained from the Beckn Registry.
variables:
subscriberUrl:
default: example.beckn.io
description: Registered subscriber URL of the Beckn network participant (BAP or BPP) as published in the Beckn Registry.
paths:
/discover:
post:
summary: Discover catalogs on a network
description: 'Search and discover catalogs on an open network. Supports text search (textSearch),
JSONPath-based filtering (RFC 9535), spatial (geo) constraints, and media search.
Returns an **ACK** confirming receipt; actual catalogs arrive via `/beckn/on_discover`.
Can be implemented by Catalog Discovery Services (CDS) and BPPs.'
operationId: discover
tags:
- Discovery
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
enum:
- discover
message:
$ref: '#/components/schemas/DiscoverAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_discover:
post:
summary: Callback — return catalogs to the BAP
description: 'Callback from a BPP or CDS containing catalogs matching the discovery request.
Returns an **ACK** confirming receipt of the catalog payload.'
operationId: onDiscover
tags:
- Discovery
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_discover
message:
$ref: '#/components/schemas/OnDiscoverAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/select:
post:
summary: BAP selects items/resources and requests a quote
description: 'The BAP selects catalog items, item quantities, associated offers, and requests
the BPP to provide a priced quote. No PII is shared at this stage.
Uses the contract model.'
operationId: select
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: select
message:
$ref: '#/components/schemas/SelectAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_select:
post:
summary: BPP returns a priced quote
description: 'The BPP calculates the total cost, evaluates offers, and returns a priced quote.
Uses the contract model.'
operationId: onSelect
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_select
message:
$ref: '#/components/schemas/OnSelectAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/init:
post:
summary: BAP initiates final contract — submits billing, fulfillment and payment intent
description: 'BAP provides billing, fulfillment, and payment information for the BPP to generate
final contract terms. The BPP responds via `on_init` with the final draft including
payment terms. Uses the contract model.'
operationId: init
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: init
message:
$ref: '#/components/schemas/InitAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_init:
post:
summary: BPP returns final draft contract with payment terms
description: 'BPP returns the final draft contract with personalized payment terms.
The BPP MUST NOT request payment before this stage.'
operationId: onInit
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_init
message:
$ref: '#/components/schemas/OnInitAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/confirm:
post:
summary: BAP confirms the contract
description: 'BAP accepts all terms and provides payment proof/reference, then requests the BPP
to confirm the contract into a binding commitment.'
operationId: confirm
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: confirm
message:
$ref: '#/components/schemas/ConfirmAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_confirm:
post:
summary: BPP returns the confirmed contract
description: 'BPP validates all terms, payment, and returns a confirmed contract with
its assigned ID and the initial fulfillment/performance state.'
operationId: onConfirm
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_confirm
message:
$ref: '#/components/schemas/OnConfirmAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/status:
post:
summary: BAP requests the current state of an contract
description: 'BAP requests the latest state of an active contract by providing its ID.
The BPP responds via `on_status`. BAPs SHOULD NOT long-poll with `status` —
use `on_status` push notifications for significant state changes.'
operationId: status
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: status
message:
$ref: '#/components/schemas/StatusAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_status:
post:
summary: BPP returns the current state of the contract
description: 'BPP returns the latest state of the contract including fulfillment/performance
updates. The BPP MAY call this endpoint proactively without the BAP requesting it,
but MUST have received at least one `status` request first to initiate the push stream.
This endpoint is for significant state changes worth a notification — NOT for
real-time location tracking (use `track`/`on_track` for that).'
operationId: onStatus
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_status
message:
$ref: '#/components/schemas/OnStatusAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/track:
post:
summary: BAP requests a real-time tracking handle for an active contract
description: 'BAP requests a tracking handle (URL, WebSocket endpoint, or webhook) for real-time
tracking of an active fulfillment or performance stage. This is for real-time
position/progress updates — NOT for contract state change notifications (use `status`).'
operationId: track
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: track
message:
$ref: '#/components/schemas/TrackAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_track:
post:
summary: BPP returns real-time tracking handle and status
operationId: onTrack
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_track
message:
$ref: '#/components/schemas/OnTrackAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/update:
post:
summary: BAP requests a mutation to an active contract
description: "BAP requests the BPP to update an active contract. Updates may involve\nchange of items, quantities, billing, fulfillment/performance, or payment.\n\nUses the `context.try` two-phase pattern (defined in `Context` schema):\n- `context.try: true` — BAP requests updated terms before committing (preview mode).\n BPP responds with recalculated quote and terms via `on_update` without changing state.\n- `context.try: false` (default) — BAP commits the update.\n BPP responds with the confirmed updated contract."
operationId: update
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: update
message:
$ref: '#/components/schemas/UpdateAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_update:
post:
summary: BPP returns the updated contract
description: 'BPP returns the updated contract with recalculated terms. Can be called
proactively by the BPP without the BAP requesting it.
- If `context.try: true` — returns updated terms (preview; state not changed).
- If `context.try: false` — returns committed updated contract.'
operationId: onUpdate
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_update
message:
$ref: '#/components/schemas/OnUpdateAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/cancel:
post:
summary: BAP requests cancellation of an contract
description: "BAP requests full or partial cancellation. Uses the `context.try` two-phase pattern:\n- `context.try: true` — BAP requests cancellation terms (e.g., refund policy, penalty)\n without committing to cancellation. BPP responds with applicable policy via `on_cancel`.\n- `context.try: false` (default) — BAP commits the cancellation.\n BPP confirms cancellation and returns cancelled contract."
operationId: cancel
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: cancel
message:
$ref: '#/components/schemas/CancelAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_cancel:
post:
summary: BPP returns cancellation terms or confirms cancellation
description: "- If `context.try: true` — returns applicable cancellation policy, fees, refund timeline\n (state not changed).\n- If `context.try: false` — returns confirmed cancelled contract with refund/payment update."
operationId: onCancel
tags:
- Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_cancel
message:
$ref: '#/components/schemas/OnCancelAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/rate:
post:
summary: BAP submits ratings for one or more entities
description: 'BAP submits ratings for any ratable entity (contract, contract, fulfillment,
item, provider, agent, support interaction). Supports the `context.try` pattern:
- `context.try: true` — Preview: BPP returns the rating form/criteria without recording.
- `context.try: false` (default) — Submit: BPP records the rating and returns confirmation.
The BPP acknowledges via `on_rate` with an optional aggregate snapshot.'
operationId: rate
tags:
- Post-Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: rate
message:
$ref: '#/components/schemas/RateAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_rate:
post:
summary: BPP acknowledges rating and optionally returns aggregate
description: '- If `context.try: true` — returns rating form/criteria (preview mode).
- If `context.try: false` — confirms rating was recorded; optionally returns aggregate.'
operationId: onRate
tags:
- Post-Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_rate
message:
$ref: '#/components/schemas/OnRateAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/support:
post:
summary: BAP requests support information for an entity
description: 'BAP requests support channels and/or raises a support ticket for any entity.
Uses the `context.try` pattern:
- `context.try: true` — Preview: BPP returns available support channels without creating a ticket.
- `context.try: false` (default) — BAP submits a support request; BPP creates/links a ticket.
The `refType` field abstracts over domain-specific entity types (works for contracts,
resources, providers, agents — not just contracts).'
operationId: support
tags:
- Post-Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: support
message:
$ref: '#/components/schemas/SupportAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/on_support:
post:
summary: BPP returns support details
description: '- If `context.try: true` — returns available support channels (preview mode).
- If `context.try: false` — returns support details with ticket(s).'
operationId: onSupport
tags:
- Post-Fulfillment
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
const: on_support
message:
$ref: '#/components/schemas/OnSupportAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'500':
$ref: '#/components/responses/ServerError'
/catalog/publish:
post:
summary: BPP publishes catalogs for indexing by a CDS
description: 'BPP submits one or more catalogs to be indexed by a Catalog Discovery Service (CDS).
Returns an **ACK** immediately if accepted for processing. The per-catalog processing
result arrives asynchronously via `/beckn/catalog/on_publish`.'
operationId: catalogPublish
tags:
- Catalog Publishing
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- context
- message
properties:
context:
allOf:
- $ref: '#/components/schemas/Context'
- type: object
properties:
action:
type: string
enum:
- catalog/publish
- catalog_publish
message:
$ref: '#/components/schemas/CatalogPublishAction'
responses:
'200':
$ref: '#/components/responses/Ack'
'400':
$ref: '#/components/responses/NackBadRequest'
'401':
$ref: '#/components/responses/NackUnauthorized'
'409':
$ref: '#/components/responses/AckNoCallback'
'500':
$ref: '#/components/responses/ServerError'
/catalog/on_publish:
post:
summary: CDS returns per-catalog processing results to the BPP
operationId: catalogOnPublish
tags:
- Catalog Publishing
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
required: true
content: