Inconsistent metadata Support Across Core Modules (Promotion, Price List, Stock Location, Tax Regions, API Keys, Campaigns) #14645
rotema-konimbo
started this conversation in
Feature Requests
Replies: 2 comments
|
Agree, the metadata should be available in all models. I was using metadata in shipping methods in v1, and now I'm in the process of migration, and metadata is missing |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Bug report
Describe the bug
Some core modules in Medusa v2 do not expose a
metadatafield on their primary data models. This makes it difficult to store additional, custom key–value data consistently across the platform.Examples of modules/models where
metadatais missing:Promotiondoes not exposemetadatain its data model. The official reference only lists structural fields (id,code,is_automatic,is_tax_inclusive,type,status) and relations, with nometadataproperty. [Promotion model]PostTaxRegionsAdmin API shows the tax region’s input schema and includesmetadataon the tax region object and on thedefault_tax_rate, but the underlying data model reference is missing / unclear, so there is no direct confirmation that ametadatacolumn exists on the stored tax region entity. [PostTaxRegions]Other modules where metadata support is expected for extensibility but appears missing or undocumented (based on current documentation):
For comparison, other entities such as product categories, collections, inventory items, images, etc. do expose
metadataexplicitly in their Admin API schemas. [Admin product/category metadata]It would be ideal if all primary entities supported
metadataconsistently, or if the docs clearly stated that the recommended way to extend those entities is only via module links and separate models.System information
Medusa version (including plugins): v2 (framework / modules) – as per current documentation
Node.js version: N/A (documentation-level issue)
Database: N/A
Operating system: N/A
Browser (if relevant): N/A
Steps to reproduce the behavior
Promotionmodel does not listmetadataas a property. [Promotion model]metadatafields (e.g. collections, categories, inventory items, images). [Admin API responses]metadatafields or data model references for:metadatais inconsistent or undocumented for these modules/models.Expected behavior
metadataJSON field for custom key–value data, ormetadata, and that the only recommended extension mechanism is via separate models and module links.metadata(or its absence) in the data model references for these modules so that developers can rely on a consistent extension pattern.Screenshots
N/A – this is based on documentation and model references.
Code snippets
N/A – this is primarily a schema / documentation issue.
Additional context
Custommodel and link it using a module link toPromotionin order to store extra data. [Extend promotion data model]metadatafield on key entities would simplify many customization scenarios and bring these modules in line with others that already supportmetadata.metadatato these entities, it would be very helpful to document that explicitly and clarify the recommended extension strategy in each affected module’s reference.All reactions