β οΈ Active Development Notice
This repository is under active development. All in-progress content lives in thedraftbranch. Content is being progressively reviewed and merged intomainvia pull requests.
This repository contains the domain-agnostic core schema definitions for the Beckn Protocol v2.0 β the canonical set of JSON-LD contexts, RDF vocabularies, and OpenAPI 3.1 attribute definitions that form the semantic foundation of every Beckn network.
Every participant in a Beckn network β buyers, sellers, platforms, gateways, and infrastructure services β speaks in terms of the types defined here: Catalog, Item, Fulfillment, Contract, Intent, Provider, Consumer, and ~85 others. This repository is where those types are formally defined.
In Beckn Protocol v1.x, all schema definitions lived inside a single monolithic YAML file inside the protocol specifications repository. This caused compounding problems:
- Versioning friction: A change to any one schema β even a minor attribute addition β forced a version bump on the entire specification. There was no way to release
Address v1.1without also releasing a new version ofCatalog,Fulfillment, and every other schema. - Coupling: Schema concerns were tightly entangled with protocol transport concerns. The payload shape and the API envelope lived in the same file.
- Domain extensibility required forking: When a domain (e.g., mobility, healthcare) needed to add domain-specific attributes, the only option was to fork the entire specification β there was no formal extension mechanism.
- Semantic opacity: Terms like
"address"or"status"had no globally unique identity. Two implementations could disagree on what"status"meant, with no way to detect or resolve the conflict.
Beckn Protocol v2.0 solves this with a three-tier schema model that separates concerns cleanly across three repositories, each with its own versioning lifecycle:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tier 1 β Transport Envelope β
β Repository: beckn/protocol-specifications-v2 β
β Contains: API message envelope, Context object, RequestContainer, β
β CallbackContainer, AckResponse, all 14 API actions β
β Versioned: with the full protocol specification β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β references payload schemas from
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β Tier 2 β Core Schema β THIS REPOSITORY β
β Repository: beckn/core_schema β
β Contains: All domain-agnostic schemas (Address, Catalog, Item, β
β Fulfillment, Contract, Intent, Provider, etc.) β
β Versioned: independently, per-schema β
β Namespace: https://schema.beckn.io/core/v2.0/ β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β extended by
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β Tier 3 β Domain Schema Packs β
β Repository: one per vertical (e.g., beckn/mobility, beckn/health) β
β Contains: Domain-specific schemas that extend Tier 2 types β
β Versioned: independently, per domain pack β
β Namespace: defined per domain (e.g., https://schema.beckn.io/mob/) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Principle | What it means |
|---|---|
| Separation of concerns | Transport, core data types, and domain extensions live in independent repositories with independent versioning. A change to Address doesn't touch the protocol envelope. |
| Domain-agnosticism | Every schema in this repository must be meaningful across multiple industries. Item is a product in retail, a ride in mobility, a consultation in healthcare. No industry-specific attributes belong here. |
| Independent schema versioning | Each schema has its own version directory (v2.0/, v2.1/, etc.). Fulfillment can release v2.1 while Address stays at v2.0. |
| Semantic grounding | Every term maps to a globally unique IRI in the beckn: namespace (https://schema.beckn.io/core/v2.0/). "address" in a Beckn document is unambiguously beckn:address β not a plain string. |
| OpenAPI 3.1 compatibility | Every schema is a standalone, $ref-able OpenAPI 3.1 component. No schema registry or toolchain is required β just a URL. |
| Linked Data alignment | Every schema is simultaneously valid JSON and valid RDF. Systems that don't know JSON-LD process it as plain JSON. Systems that do can build knowledge graphs, run SPARQL queries, and align with external ontologies. |
- Stable, URL-addressable schemas β Reference
Address v2.0directly by URL in your OpenAPI definitions. It won't change unless explicitly versioned. - No monolithic dependency β You can adopt the schemas you need without taking a dependency on the full protocol specification.
- Forward compatibility β Minor additions (new optional attributes) never break existing implementations.
- Extend, don't fork β Add
vehicleTypetoFulfillmentin your mobility pack without modifying or forking the core schema. - Semantic interoperability out of the box β Your domain-specific types share the same RDF namespace foundation. A healthcare
Itemand a logisticsItemare bothbeckn:Itemβ interoperability is automatic for the shared attributes. - Governed extension points β The Schema Pack Contract (defined in
protocol-specifications-v2) specifies exactly how domain packs reference and extend core schemas.
- Independent release cadences β The core schema can release a new version without waiting for a full protocol specification release.
- Immutable IRIs β Once a term is published (e.g.,
beckn:Contract), its IRI is permanent. Linked Data graphs built years ago remain valid. - Formal deprecation path β Terms are never silently removed. They are deprecated with a replacement reference, retained for at least one version cycle, and only removed (from structural files) in a Major release.
Every schema is available as a standalone OpenAPI 3.1 component, referenceable by raw URL. A Beckn BAP or BPP implementation simply $ref-references the schemas it needs:
# In your OpenAPI spec:
components:
schemas:
Address:
$ref: 'https://raw.githubusercontent.com/beckn/core_schema/main/schema/Address/v2.0/attributes.yaml#/components/schemas/Address'
Catalog:
$ref: 'https://raw.githubusercontent.com/beckn/core_schema/main/schema/Catalog/v2.0/attributes.yaml#/components/schemas/Catalog'The Tier 1 transport envelope (protocol-specifications-v2) uses exactly this mechanism β it $ref-references the core schemas from this repository to define the payload body of each API action.
Reference the root context in any JSON-LD document to make all Beckn core terms semantically unambiguous:
{
"@context": "https://schema.beckn.io/core/v2.0/context.jsonld",
"@type": "Catalog",
"descriptor": {
"name": "Fresh Produce by Green Farms"
},
"providers": [
{
"@type": "Provider",
"id": "prov-001",
"descriptor": { "name": "Green Farms" }
}
]
}When processed as JSON-LD, "Catalog" resolves to https://schema.beckn.io/core/v2.0/Catalog, making it unambiguous in any context β a database, a knowledge graph, or an API call.
The schema/vocab.jsonld file defines all Beckn core schema types and properties as RDF classes and properties. This enables:
- SPARQL queries over Beckn data graphs
- Ontology alignment with Schema.org, GS1, and other semantic standards
- Automated inference and validation using RDF tooling
Domain schema packs (Tier 3) extend core schemas for specific industry verticals. The extension model has two forms:
A domain pack adds industry-specific attributes by extending a core schema:
# In beckn/mobility β schema/RideService/v1.0/attributes.yaml
components:
schemas:
RideService:
allOf:
- $ref: 'https://raw.githubusercontent.com/beckn/core_schema/main/schema/Item/v2.0/attributes.yaml#/components/schemas/Item'
- type: object
properties:
vehicleType:
type: string
enum: [AUTO, CAB, BIKE]
seatingCapacity:
type: integerRideService is a beckn:Item with additional mobility-specific attributes. The core Item schema is unchanged.
Domain packs extend the JSON-LD context with their own namespace, without overriding any protected core terms:
{
"@context": [
"https://schema.beckn.io/core/v2.0/context.jsonld",
{
"mob": "https://schema.beckn.io/mobility/v1.0/",
"vehicleType": "mob:vehicleType",
"seatingCapacity": "mob:seatingCapacity"
}
],
"@type": "RideService",
"vehicleType": "CAB",
"seatingCapacity": 4
}The core terms remain @protected β domain packs add their own terms but cannot redefine what beckn:address or beckn:item means.
beckn:Item β Tier 2 Core Schema (this repository)
βββ mob:RideService β Tier 3 Mobility Domain Pack
βββ health:Consultation β Tier 3 Healthcare Domain Pack
βββ energy:TariffSlot β Tier 3 Energy Domain Pack
βββ logistics:Shipment β Tier 3 Logistics Domain Pack
Each domain vertical gets its own namespace, its own versioning, and its own governance β but they all share the same semantic base. A platform consuming data from both a mobility provider and a logistics provider can unambiguously identify that both are dealing with beckn:Item objects, even though the domain-specific extensions differ.
The draft branch contains the complete v2.0 content currently under review. It will be progressively merged into main via pull requests. Here is a preview:
| Category | Schemas |
|---|---|
| Discovery | DiscoverAction, OnDiscoverAction, Catalog, Provider, Item, Offer, Intent, MediaSearch, MediaSearchOptions, MediaInput |
| Selection | SelectAction, OnSelectAction, CheckoutTerminal |
| Initialisation | InitAction, OnInitAction, Contract, ContractItem |
| Confirmation | ConfirmAction, OnConfirmAction |
| Fulfillment | Fulfillment, FulfillmentAgent, FulfillmentMode, FulfillmentStage, FulfillmentStageAuthorization, FulfillmentStageEndpoint, Tracking, TrackingRequest, TrackAction, OnTrackAction |
| Post-transaction | UpdateAction, OnUpdateAction, CancelAction, OnCancelAction, CancellationPolicy, CancellationOutcome, CancellationReason, StatusAction, OnStatusAction, RateAction, OnRateAction |
| Payment | PaymentAction, PaymentTerms, PaymentTrigger, AcceptedPaymentMethod, PriceSpecification, SettlementTerm, SettlementSchedule, RefundTerms, Invoice |
| Support | SupportAction, OnSupportAction, SupportRequest, SupportTicket, SupportInfo |
| Common types | Address, Person, Organization, Descriptor, Location, GeoJSONGeometry, TimePeriod, Time, Quantity, MediaFile, Skill, State, Alert, Instruction |
| Governance | Credential, Eligibility, Entitlement, Policy, Document, Form, Rating, RatingForm, RatingInput, DisplayedRating, Feedback |
| Infrastructure | Context, Error, ErrorResponse, ProcessingNotice, CatalogProcessingResult, TransactionEndpoint, Participant, Consumer, CategoryCode, Constraint, SpatialConstraint, Attributes |
| Document | Contents |
|---|---|
1_Introduction.md |
Three-tier model, design rationale, relationship to protocol-specifications-v2 |
2_Schema_Structure.md |
Normative directory layout, file naming conventions, attributes.yaml structure |
3_JSON_LD_Context_and_Vocabulary.md |
beckn: namespace, @protected contexts, term mapping patterns, enum handling |
4_Versioning_and_Deprecation.md |
Semver rules, what triggers Minor vs Major, deprecation lifecycle, IRI retention |
5_Contributing_Schemas.md |
Step-by-step guide: proposal β authoring β PR, with templates and worked examples |
GOVERNANCE.mdβ Maintainer roles, voting thresholds, review requirements, Major change processCONTRIBUTING.mdβ PR checklist, file templates, attribute authoring guidelinesCHANGELOG.mdβ Full v2.0 change log including v1.x β v2.0 term renamesCODE_OF_CONDUCT.mdβ Community standardsLICENSE.mdβ CC BY-NC-SA 4.0
core_schema/
βββ schema/
β βββ context.jsonld β Root JSON-LD context (@protected, all ~90 schemas)
β βββ vocab.jsonld β Root RDF vocabulary (all classes and properties)
β βββ README.md β Alphabetical schema index with descriptions
β βββ {SchemaName}/
β βββ v2.0/
β βββ attributes.yaml β OpenAPI 3.1 component definition
β βββ context.jsonld β Per-schema JSON-LD context
β βββ vocab.jsonld β Per-schema RDF vocabulary
βββ docs/
β βββ README.md β Staged reading guide
β βββ 1_Introduction.md
β βββ 2_Schema_Structure.md
β βββ 3_JSON_LD_Context_and_Vocabulary.md
β βββ 4_Versioning_and_Deprecation.md
β βββ 5_Contributing_Schemas.md
βββ CHANGELOG.md
βββ CODE_OF_CONDUCT.md
βββ CONTRIBUTING.md
βββ GOVERNANCE.md
βββ LICENSE.md
| Repository | Tier | Description |
|---|---|---|
| beckn/protocol-specifications-v2 | Tier 1 | Full protocol spec, API envelope, RFC documents |
beckn/core_schema β this repo |
Tier 2 | Domain-agnostic core schema definitions |
beckn/mobility (planned) |
Tier 3 | Mobility domain schema pack |
beckn/healthcare (planned) |
Tier 3 | Healthcare domain schema pack |
beckn/energy (planned) |
Tier 3 | Energy domain schema pack |
beckn/logistics (planned) |
Tier 3 | Logistics domain schema pack |
| Branch | Purpose | Status |
|---|---|---|
main |
Stable, reviewed content only | Active β this README |
draft |
All v2.0 schemas, docs, and governance files | Under review β being merged progressively |
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).