Marketplace
Discover, publish, and subscribe to shared channels across organizations
The marketplace is a channel discovery and sharing platform. Organisations can publish channels for others to consume, and subscribers can browse, evaluate, and connect to shared data streams without custom integrations.
How the marketplace works
The marketplace connects publishers (organisations that produce data) with consumers (organisations that need that data). Publishers list channels in the marketplace with documentation, pricing, and access controls. Consumers browse listings, request access, and subscribe.
| Role | Description |
|---|---|
| Publisher | Organisation that creates a marketplace listing for a channel |
| Consumer | Organisation that discovers and subscribes to a listed channel |
| Listing | A channel's marketplace entry with metadata, docs, and terms |
Publishing a channel
Create a listing to make a channel available in the marketplace.
const listing = await npayload.marketplace.createListing({
channel: 'weather-alerts',
name: 'Real-time Weather Alerts',
description: 'Severe weather notifications by region with lat/lng coordinates',
category: 'data-feeds',
tags: ['weather', 'alerts', 'geospatial'],
documentation: 'https://docs.example.com/weather-alerts',
pricing: {
model: 'free', // or 'per-message', 'monthly', 'tiered'
},
access: {
type: 'open', // or 'request', 'invite-only'
},
});Pricing models
| Model | Description |
|---|---|
| Free | No charge. Open for any subscriber. |
| Per-message | Charged per message delivered |
| Monthly | Fixed monthly subscription fee |
| Tiered | Volume-based pricing with tiers |
Access types
| Type | Description |
|---|---|
| Open | Any organisation can subscribe immediately |
| Request | Organisations request access. Publisher approves or denies. |
| Invite-only | Publisher explicitly invites organisations |
Discovering channels
Browse the marketplace to find channels published by other organisations.
// Search the marketplace
const listings = await npayload.marketplace.search({
query: 'payment events',
category: 'fintech',
});
// Get listing details
const listing = await npayload.marketplace.getListing('listing_abc123');
console.log(listing.name);
console.log(listing.description);
console.log(listing.publisher.name);
console.log(listing.pricing);
console.log(listing.eventTypes); // Registered schemas for this channelCategories
// List available categories
const categories = await npayload.marketplace.listCategories();
// Browse by category
const listings = await npayload.marketplace.search({
category: 'logistics',
});Subscribing to a listing
Once you find a channel, subscribe to start receiving messages.
// Subscribe to a marketplace listing
const subscription = await npayload.marketplace.subscribe({
listingId: 'listing_abc123',
name: 'our-weather-consumer',
endpoint: {
url: 'https://api.example.com/webhooks/weather',
},
});For listings that require approval, the subscription enters a pending state until the publisher approves.
// Check subscription status
const status = await npayload.marketplace.subscriptionStatus('sub_xyz789');
console.log(status.state); // 'pending', 'active', 'rejected'Trust and reviews
Consumers can review marketplace listings, providing ratings and feedback. This builds trust and helps other organisations make informed decisions.
// Leave a review
await npayload.marketplace.review({
listingId: 'listing_abc123',
rating: 5,
comment: 'Reliable data feed with low latency. Schema is well-documented.',
});
// Read reviews
const reviews = await npayload.marketplace.listReviews('listing_abc123');Only organisations with an active subscription can leave reviews. This ensures that reviews come from actual consumers.
Privacy and access control
Publishers retain full control over who can access their channels and what data is shared.
// Update access controls
await npayload.marketplace.updateListing('listing_abc123', {
access: {
type: 'request',
autoApprove: false,
},
});
// Approve a pending subscription
await npayload.marketplace.approveSubscription('sub_pending_456');
// Revoke access
await npayload.marketplace.revokeSubscription('sub_xyz789');Revoking a subscription immediately stops message delivery. The consumer's endpoint will no longer receive messages from the listed channel.
Managing listings
// Update listing metadata
await npayload.marketplace.updateListing('listing_abc123', {
description: 'Updated description with new coverage areas',
tags: ['weather', 'alerts', 'geospatial', 'real-time'],
});
// Pause a listing (stop accepting new subscribers)
await npayload.marketplace.pauseListing('listing_abc123');
// Archive a listing (remove from marketplace)
await npayload.marketplace.archiveListing('listing_abc123');Use cases
| Use case | How the marketplace helps |
|---|---|
| Data providers | Monetize data feeds by listing channels with per-message or subscription pricing |
| API marketplaces | Replace polling-based APIs with real-time event streams |
| Partner integrations | Share events between partner organisations without point-to-point connections |
| Internal platforms | Large organisations can use the marketplace for internal team-to-team data sharing |
| Industry data networks | Multiple companies in the same industry share standardised event streams |
Next steps
- Channels to understand the channels that power marketplace listings
- Event catalogue to learn about schema registration for listed channels
- Cross-region messaging for marketplace listings that span regions
Was this page helpful?