What needs to be done
Explore and implement a Mandi provider plugin, serving the openagrinet:MandiPrice capability against Agmarknet market price data.
It should be a sibling to the existing weather plugin: a small domain package alongside pkg/plugin/implementation/weather, wrapping the generic machinery in pkg/plugin/implementation/internal/upstream. That package already resolves the endpoint, method, timeouts and mapping from the registry per request, so the domain package supplies only its name and whatever pre-call work a mapping cannot express.
Schemas
The core Beckn v2 LTS spec governs the envelope and is already configured, so select and on_select need no new plumbing. resourceAttributes uses the MandiPrice v0.1 pack, @type openagrinet:MandiPrice, which is also the capabilityCode in the registry.
The pack mirrors WeatherObservation: it extends AgricultureResource and splits on informationMode. Publish and select are OnDemand, requiring supportedCommodities and supportedPriceFields and forbidding prices. The on_select answer is Direct, requiring source, commodity, market, arrivalDate, prices and generatedAt.
What to explore
The Agmarknet upstream takes statecode, districtcode, marketcode, commoditycode, from_date and to_date, while the pack models a market object carrying marketName, marketCode, district and state, plus a commodity Descriptor. Where those line up, the plugin is data only: registry rows and a mapping, with no Go and no pre-call step, exactly like Mausamgram.
Worth confirming before building:
- whether a consumer is expected to send governed codes, or names that need resolving to codes
- if names, where that resolution lives, given the strict rule that the adapter may call HTTP services but must never talk to a database
- whether a date range is required, or the upstream defaults it
The provider backend resolves these today with SQL, both a spatial lookup for market codes and a three tier match for commodities, so any resolution the adapter needs has to be exposed over HTTP or served as a static lookup document.
What needs to be produced
A Mandi provider plugin conforming to the OAN network schema, its mapping file published alongside the existing ones, and an end to end select returning a Direct MandiPrice answer that validates against both the core spec and the MandiPrice v0.1 pack.
What needs to be done
Explore and implement a Mandi provider plugin, serving the
openagrinet:MandiPricecapability against Agmarknet market price data.It should be a sibling to the existing weather plugin: a small domain package alongside
pkg/plugin/implementation/weather, wrapping the generic machinery inpkg/plugin/implementation/internal/upstream. That package already resolves the endpoint, method, timeouts and mapping from the registry per request, so the domain package supplies only its name and whatever pre-call work a mapping cannot express.Schemas
The core Beckn v2 LTS spec governs the envelope and is already configured, so
selectandon_selectneed no new plumbing.resourceAttributesuses the MandiPrice v0.1 pack,@typeopenagrinet:MandiPrice, which is also thecapabilityCodein the registry.The pack mirrors WeatherObservation: it extends AgricultureResource and splits on
informationMode. Publish and select areOnDemand, requiringsupportedCommoditiesandsupportedPriceFieldsand forbiddingprices. Theon_selectanswer isDirect, requiringsource,commodity,market,arrivalDate,pricesandgeneratedAt.What to explore
The Agmarknet upstream takes
statecode,districtcode,marketcode,commoditycode,from_dateandto_date, while the pack models amarketobject carryingmarketName,marketCode,districtandstate, plus acommodityDescriptor. Where those line up, the plugin is data only: registry rows and a mapping, with no Go and no pre-call step, exactly like Mausamgram.Worth confirming before building:
The provider backend resolves these today with SQL, both a spatial lookup for market codes and a three tier match for commodities, so any resolution the adapter needs has to be exposed over HTTP or served as a static lookup document.
What needs to be produced
A Mandi provider plugin conforming to the OAN network schema, its mapping file published alongside the existing ones, and an end to end
selectreturning aDirectMandiPrice answer that validates against both the core spec and the MandiPrice v0.1 pack.