Skip to content

Marketplace

Base URL: /v1


GET /v1/marketplace

Returns a cursor-paginated list of published products with seller info.

Authentication: None (public)

ParameterTypeRequiredDefaultDescription
categorystringNoFilter products by category ID.
cursorstringNoCursor token for pagination. Obtained from next_cursor.
limitnumberNo20Number of results per page. Min 1, max 50.
sortstringNonewestSort order. One of: newest, price_asc, price_desc.
{
"products": [
{
"id": "prod_abc123",
"name": "UI Component Kit",
"description": "A premium set of reusable UI components.",
"price": 49.99,
"category_id": "cat_design",
"status": "published",
"created_at": "2026-03-15T10:30:00Z",
"user_id": "usr_seller01",
"seller": {
"id": "usr_seller01",
"username": "designpro",
"first_name": "Alex",
"last_name": "Rivera",
"avatar_url": "https://cdn.example.com/avatars/designpro.jpg"
}
}
],
"next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wMy0xNVQxMDozMDowMFoifQ=="
}
FieldTypeDescription
productsarrayArray of product objects.
products[].idstringUnique product identifier.
products[].namestringProduct name.
products[].descriptionstringProduct description.
products[].pricenumberProduct price.
products[].category_idstringCategory the product belongs to.
products[].statusstringAlways "published" in this endpoint.
products[].created_atstringISO 8601 creation timestamp.
products[].user_idstringID of the seller.
products[].sellerobjectEmbedded seller profile.
next_cursorstring | nullCursor for the next page. null if no more results.

GET /v1/marketplace/{id}

Returns a single product with full details, seller profile, and reviews.

Authentication: None (public)

ParameterTypeRequiredDescription
idstringYesThe product ID.
{
"product": {
"id": "prod_abc123",
"name": "UI Component Kit",
"description": "A premium set of reusable UI components.",
"price": 49.99,
"category_id": "cat_design",
"status": "published",
"created_at": "2026-03-15T10:30:00Z",
"user_id": "usr_seller01",
"seller": {
"id": "usr_seller01",
"username": "designpro",
"first_name": "Alex",
"last_name": "Rivera",
"avatar_url": "https://cdn.example.com/avatars/designpro.jpg"
},
"reviews": [
{
"id": "rev_001",
"user_id": "usr_buyer42",
"rating": 5,
"comment": "Excellent quality components!",
"created_at": "2026-03-20T14:00:00Z"
}
]
}
}
StatusDescription
404Product not found.

GET /v1/store/{userId}

Returns a user’s store profile and their listed products. If the user has no store, store is null.

Authentication: None (public)

ParameterTypeRequiredDescription
userIdstringYesThe user ID.
{
"store": {
"id": "store_001",
"user_id": "usr_seller01",
"name": "DesignPro Shop",
"description": "Premium design assets and tools.",
"logo_url": "https://cdn.example.com/stores/designpro-logo.png",
"created_at": "2026-01-10T08:00:00Z",
"updated_at": "2026-03-01T12:00:00Z"
},
"products": [
{
"id": "prod_abc123",
"name": "UI Component Kit",
"description": "A premium set of reusable UI components.",
"price": 49.99,
"category_id": "cat_design",
"status": "published",
"created_at": "2026-03-15T10:30:00Z",
"user_id": "usr_seller01"
}
]
}
FieldTypeDescription
storeobject | nullThe user’s store, or null if none exists.
productsarrayArray of products belonging to the store.

POST /v1/store

Creates or updates the authenticated user’s store. Upserts on user_id — if a store already exists, it is updated.

Authentication: Required

FieldTypeRequiredDescription
namestringNoStore display name.
descriptionstringNoStore description.
logo_urlstringNoURL to the store logo image.
{
"name": "DesignPro Shop",
"description": "Premium design assets and tools.",
"logo_url": "https://cdn.example.com/stores/designpro-logo.png"
}
{
"store": {
"id": "store_001",
"user_id": "usr_seller01",
"name": "DesignPro Shop",
"description": "Premium design assets and tools.",
"logo_url": "https://cdn.example.com/stores/designpro-logo.png",
"created_at": "2026-01-10T08:00:00Z",
"updated_at": "2026-03-30T09:15:00Z"
}
}
StatusDescription
401Unauthorized. Token missing or invalid.

GET /v1/explore

Returns trending posts, popular verified users, and available categories for discovery.

Authentication: None (public)

ParameterTypeRequiredDefaultDescription
limitnumberNo20Max items per section. Max 50.
{
"trending_posts": [
{
"id": "post_tr01",
"title": "Getting Started with Edge Computing",
"content": "A deep dive into...",
"created_at": "2026-03-29T18:00:00Z",
"author": {
"id": "usr_author01",
"username": "techwriter",
"first_name": "Jordan",
"last_name": "Lee",
"avatar_url": "https://cdn.example.com/avatars/techwriter.jpg"
}
}
],
"popular_users": [
{
"id": "usr_pop01",
"username": "fullstackdev",
"first_name": "Sam",
"last_name": "Chen",
"avatar_url": "https://cdn.example.com/avatars/fullstackdev.jpg",
"verified": true
}
],
"categories": [
{
"id": "cat_design",
"name": "Design"
},
{
"id": "cat_dev",
"name": "Development"
}
]
}
FieldTypeDescription
trending_postsarrayPosts currently trending, with embedded author.
popular_usersarrayPopular verified users.
categoriesarrayAll available categories.

GET /v1/suggestions

Returns suggested users to follow. Excludes users the caller already follows and the caller themselves.

Authentication: Required

ParameterTypeRequiredDefaultDescription
limitnumberNo10Number of suggestions. Max 30.
{
"suggestions": [
{
"id": "usr_sug01",
"username": "creativecoder",
"first_name": "Taylor",
"last_name": "Brooks",
"avatar_url": "https://cdn.example.com/avatars/creativecoder.jpg",
"caption": "Full-stack developer and open source contributor",
"verified": true
}
]
}
FieldTypeDescription
suggestionsarrayArray of suggested user profiles.
suggestions[].idstringUser ID.
suggestions[].usernamestringUsername.
suggestions[].first_namestringFirst name.
suggestions[].last_namestringLast name.
suggestions[].avatar_urlstringAvatar image URL.
suggestions[].captionstringUser bio or caption.
suggestions[].verifiedbooleanWhether the user is verified.
StatusDescription
401Unauthorized. Token missing or invalid.

GET /v1/link-preview

Fetches Open Graph metadata for a URL. Results are cached in link_snapshots. The server enforces a 5-second timeout when fetching the target URL.

Authentication: Required

ParameterTypeRequiredDefaultDescription
urlstringYesThe URL to generate a preview for.
{
"preview": {
"url": "https://example.com/article/edge-computing",
"title": "Getting Started with Edge Computing",
"description": "Learn the fundamentals of deploying applications at the edge.",
"image": "https://example.com/og-image.png"
}
}
FieldTypeDescription
preview.urlstringThe canonical URL.
preview.titlestringPage title from OG tags.
preview.descriptionstringPage description from OG tags.
preview.imagestringOG image URL.
StatusDescription
400Missing required url query parameter.
401Unauthorized. Token missing or invalid.

GET /v1/search

Full-text search across users, posts, and products. Uses case-insensitive ILIKE matching.

Authentication: None (public)

ParameterTypeRequiredDefaultDescription
qstringYesSearch query string.
typestringNoallFilter results by type. One of: users, posts, products, all.
limitnumberNo20Max results per type. Max 50.
TypeFields Searched
usersusername, first_name, last_name
poststitle, content
productsname
{
"users": [
{
"id": "usr_match01",
"username": "designpro",
"first_name": "Alex",
"last_name": "Rivera",
"avatar_url": "https://cdn.example.com/avatars/designpro.jpg"
}
],
"posts": [
{
"id": "post_match01",
"title": "Design Systems at Scale",
"content": "How we built a design system...",
"status": "published",
"created_at": "2026-03-10T09:00:00Z"
}
],
"products": [
{
"id": "prod_match01",
"name": "Design Token Library",
"price": 29.99,
"category_id": "cat_design",
"status": "published"
}
]
}
FieldTypeDescription
usersarrayMatching user profiles. Empty array if type excludes users.
postsarrayMatching published posts. Empty array if type excludes posts.
productsarrayMatching products. Empty array if type excludes products.
StatusDescription
400Missing required q query parameter.