Network
Cross-business search and marketplace functionality
The Network module enables cross-business search for marketplace and aggregator platforms.
Search Services
GET
/v1/networks/{networkKey}/services SDK:
sdk.network.searchServices() Search for services across multiple businesses in a network.
const result = await sdk.network.searchServices({
networkKey: 'beauty-marketplace',
query: 'haircut',
location: {
lat: 40.7128,
lng: -74.0060,
radius: 10 // miles
},
priceMin: 2000,
priceMax: 10000,
cursor: null,
limit: 20
});
if (result.ok) {
result.val.items.forEach(service => {
console.log(service.name, service.business.name, service.price);
});
}Parameters
| Name | Type | Description |
|---|---|---|
networkKey required | string | Network identifier |
query optional | string | Search query |
location optional | Location | Geographic filter (lat, lng, radius) |
priceMin optional | number | Minimum price in cents |
priceMax optional | number | Maximum price in cents |
category optional | string | Filter by category |
sortBy optional | string | Sort field (distance, price, rating) |
cursor optional | string | Pagination cursor |
limit optional | number | Results per page |
Search Products
GET
/v1/networks/{networkKey}/products SDK:
sdk.network.searchProducts() Search for products across multiple businesses.
const result = await sdk.network.searchProducts({
networkKey: 'artisan-marketplace',
query: 'handmade jewelry',
category: 'accessories',
priceMin: 1000,
priceMax: 15000,
sortBy: 'price',
sortOrder: 'asc',
cursor: null,
limit: 24
});
if (result.ok) {
result.val.items.forEach(product => {
console.log(product.name, product.business.name, product.price);
});
}
Parameters
| Name | Type | Description |
|---|---|---|
networkKey required | string | Network identifier |
query optional | string | Search query |
category optional | string | Filter by category |
priceMin optional | number | Minimum price in cents |
priceMax optional | number | Maximum price in cents |
inStock optional | boolean | Only show in-stock items |
sortBy optional | string | Sort field (price, rating, newest) |
sortOrder optional | asc | desc | Sort direction |
Search Providers
GET
/v1/networks/{networkKey}/providers SDK:
sdk.network.searchProviders() Search for service providers across businesses.
const result = await sdk.network.searchProviders({
networkKey: 'fitness-network',
query: 'personal trainer',
location: {
lat: 34.0522,
lng: -118.2437,
radius: 15
},
serviceId: 'svc_personal_training',
cursor: null,
limit: 20
});
if (result.ok) {
result.val.items.forEach(provider => {
console.log(provider.name, provider.business.name, provider.distance);
});
}
Parameters
| Name | Type | Description |
|---|---|---|
networkKey required | string | Network identifier |
query optional | string | Search query |
location optional | Location | Geographic filter |
serviceId optional | string | Filter by service type |
available optional | boolean | Only show available providers |
Response Format
Network search results include business information:
interface NetworkServiceResult {
id: string;
name: string;
description: string;
price: number;
duration: number;
business: {
id: string;
name: string;
slug: string;
logo: string;
rating: number;
address: Address;
};
distance?: number; // If location filter used
}
interface NetworkProductResult {
id: string;
name: string;
description: string;
price: number;
images: string[];
inventory: number;
business: {
id: string;
name: string;
slug: string;
logo: string;
rating: number;
};
}
interface NetworkProviderResult {
id: string;
name: string;
bio: string;
image: string;
services: string[];
business: {
id: string;
name: string;
address: Address;
};
distance?: number;
}
Use Cases
Marketplace Platform
// Build a service marketplace
async function searchMarketplace(filters: SearchFilters) {
const services = await sdk.network.searchServices({
networkKey: 'wellness-marketplace',
query: filters.query,
location: filters.location,
category: filters.category,
priceMin: filters.priceRange[0],
priceMax: filters.priceRange[1],
limit: 20
});
return services.ok ? services.val.items : [];
}
// Display results with business info
function ServiceCard({ service }) {
return (
<div className="service-card">
<h3>{service.name}</h3>
<p className="business">{service.business.name}</p>
<p className="price">${(service.price / 100).toFixed(2)}</p>
<p className="distance">{service.distance?.toFixed(1)} miles away</p>
<a href={`/book/${service.business.slug}/${service.id}`}>
Book Now
</a>
</div>
);
}
Aggregator Site
// Aggregate products from multiple vendors
async function loadProducts(category: string) {
const result = await sdk.network.searchProducts({
networkKey: 'artisan-collective',
category,
inStock: true,
sortBy: 'newest',
limit: 48
});
if (result.ok) {
return result.val.items.map(product => ({
...product,
vendorUrl: `/vendor/${product.business.slug}`,
productUrl: `/product/${product.business.slug}/${product.id}`
}));
}
return [];
}
Franchise Locator
// Find nearby franchise locations
async function findNearbyLocations(lat: number, lng: number) {
const result = await sdk.network.searchProviders({
networkKey: 'franchise-network',
location: { lat, lng, radius: 25 },
sortBy: 'distance',
limit: 10
});
return result.ok ? result.val.items : [];
}
Note
Networks are created and managed by Arky. Contact support to create a network for your platform.
Tip
Use location-based search to show nearby options first—users are more likely to choose local businesses.