Skip to main content
Infidec Marketplace logo
v1.0.0

Type to search pages and sections, e.g. “razorpay”, “package name”, “SHA”.

Ad Details & Sellers

The ad page (gallery, specifications, chat, offers, favourites, reporting) and the public seller profile with follow and reviews.

Ad page

/ad/<slug> (src/app/ad/[slug]/view.tsx) calls GET /ads/<slug> and GET /ads/<slug>/related.

Ad detail
Ad page — gallery, actions and seller card
Ad detail on a phone
Ad page at phone width

Who can open it

Ad statusVisible to
approvedEveryone. Each open adds 1 to views_count
pending, rejected, draft, sold, expiredOnly the owner and staff. Others see Listing not found

The API accepts the slug or the numeric id, so /ad/123 also works.

Left column

BlockContent
BreadcrumbHome / Category / Ad title
GalleryLarge image (4:3, contained) and a thumbnail strip when there are 2+ images. Click a thumbnail to switch. No images → a placeholder icon
Badges★ Featured, the condition (new / used / refurbished), red Sold when sold
Title and priceprice_display in large navy text
Meta lineCity · Country · time since publishing · N views
SpecificationsEvery custom-field value of the ad as name: value (only when the ad has any)
DescriptionFull text, line breaks kept

Right column

BlockContent
💬 ChatStarts or reopens the conversation with the seller
💰 Make an OfferSends a price offer
♡ Save to favorites / ♥ SavedToggles the favourite
SellerAvatar, name, green check when verified, View profile → (opens /seller/<id>)
⚑ Report this adOpens the report form

Below both columns: Related Listings — up to 10 newest approved ads from the same category.

All actions need a signed-in user. A visitor who clicks one is sent to /login?next=/ad/<slug> and comes back after logging in.

Chat

Chat calls POST /conversations with { ad_id }. The API finds or creates the conversation between this buyer and the ad's seller, then the website opens /dashboard/chat?c=<conversationId>. A seller cannot chat on their own ad (You cannot start a conversation on your own ad.). See User Dashboard.

Make an Offer

The browser asks Enter your offer amount:. The amount is in major units (e.g. 250).

  • POST /offers with { ad_id, amount }.
  • The API creates an offers document (status: pending), posts a "USD 250.00 offered" message in the conversation, and notifies the seller (New offer).
  • The page shows Offer sent!

The seller answers offers in the Mobile App chat (POST /offers/<id>/accept, /reject, /counter). The website chat shows offer messages as text but has no accept / reject buttons.

Favourites

POST /ads/<id>/favorite toggles a document favorites/<userId>_<adId> and updates the ad's favorites_count. Saved ads are listed in Dashboard → Favorites.

Report this ad

Clicking ⚑ Report this ad loads the reasons from GET /report-reasons (Admin → Reports → Report Reasons) and opens an inline form:

FieldNotes
ReasonRequired. The admin reasons plus Other
Additional details (optional)Free text, up to 2000 characters

Submit report calls POST /reports with { type: "ad", id, reason, details }. The same user reporting the same ad again while a report is still open does not create a duplicate. Reports appear in Admin → Reports → User Reports (Report Reasons & User Reports).

Structured data

The page adds a schema.org Product JSON-LD block (name, description, images, category, offer price, currency, InStock or SoldOut, URL). See SEO & Sitemap.

Seller profile

Seller profile
Seller profile — follow, live ads, reviews

/seller/<id> calls GET /sellers/<id>, GET /sellers/<id>/ads and GET /sellers/<id>/reviews.

BlockContent
Header cardAvatar, name, verified check, ⭐ 4.9 (9 reviews)
CountersAds (live ads), Followers, Following
+ Follow / FollowingToggle follow
Live AdsThe seller's approved ads as cards
Ratings & ReviewsEach review: reviewer name, stars, comment, time ago. ★ Write a review button

Follow

POST /sellers/<id>/follow toggles a follows/<followerId>_<sellerId> document. On follow, the seller gets a New follower notification. You cannot follow yourself.

Write a review

★ Write a review is shown to signed-in users on profiles other than their own. The form has 1–5 stars (default 5) and Share your experience (optional).

POST /reviews with { reviewee_id, rating, comment, type: "seller_review" }. Rules enforced by the API:

  • The reviewer must have a conversation with this seller as the buyer, or a confirmed purchase (ad_sales). Otherwise: You can only review sellers you have interacted with.
  • One review per reviewer, seller and ad. Sending again updates the existing review.
  • The seller's average rating is recalculated and the seller gets a New review notification.

Reviews are managed in Admin → Seller Management → Seller Review (Seller Reviews & Reports).

Next: Posting & Managing Ads →

Something unclear or out of date? Tell us. contact@infidec.com