Skip to content

Messages

View .mdllms.txt

Users message the marketplace’s team, and each other, in conversations. Starting one again continues it.

Who answers a question about a listing or an order is the marketplace’s choice, in listings.questions_to from GET /v1/marketplace. Your shop always sends the same request, and mongrl routes it:

questions_to A question with listing_id or order_id goes to kind
team (the default) The marketplace’s team, in a support thread for that listing or order: one per person and listing (or order) support, with listing_id or order_id
seller The seller (for an order, the buyer or the seller): one per buyer and listing, or per order listing or order

support: true writes to the team in general: one thread per person, apart from those about listings and orders. When the team answers, sellers can also ask about their own listings, at any stage. Show the person who answers on the listing page, e.g. “Ask Used Icons” or “Ask the seller”.

POST /v1/me/conversations
{ "listing_id": "8f3c…", "body": "Is the leather original?" }

The answer has the conversation and the new message. If one already exists, the message joins it.

  • GET /v1/me/conversations lists the user’s conversations, latest first, each with last_message, last_message_at and unread. Page with limit and offset.
  • GET /v1/me/conversations/{id}/messages reads one, oldest first, and marks it read. Pass after=<last message id> to get only newer messages.
  • POST /v1/me/conversations/{id}/messages with { "body": "…" } replies.

In a message, from_marketplace: true means the marketplace’s team wrote it (support); otherwise sender_id is the user who did. In support conversations, user_a is the user asking. Show a conversation’s listing_id or order_id with it, so the person sees what it’s about.

Show a badge from the sum of unread. There’s no push: refresh the inbox when the user opens it, and while a conversation is open, ask for messages after the last one every few seconds.

When someone gets a message they’re emailed a link to https://<your shop>/<lang>/messages/<id>. Build that page. See Pages your shop needs.