Moments

2 operations. Every schema and example on this page is generated from the platform contract.

List a store's surfaced moments (opportunities) by status.

Merchant fetches the AI-generated moments surfaced for their store - the pending opportunities to act on, with each moment's definition and owning addon. Defaults to pending moments (expired ones excluded), and returns lifetime counts by status (pending, accepted, dismissed) for the badge rollups.

Parameters

store_idstring · uuidqueryrequired

Store whose moments to list (also authorises the merchant).

statusstringqueryoptional

Status to fetch (default 'pending'). Matches moment_instances.status exactly.

include_dismissedstringqueryoptional

Only meaningful when status='pending': pass 'true' to keep moments that carry a dismissed_reason.

limitintegerqueryoptional

Page size (default 20, max 50).

Response, 200

momentsarray of objectrequired
11 child fields
idstringrequired
statusstringrequired
confidence_scorenumberrequired
confidence_breakdownobjectrequired
target_entity_typestring, nullablerequired
target_entity_idstring, nullablerequired
contextobjectrequired
suggested_actionobjectrequired
expires_atstring, nullablerequired
created_atstringrequired
definitionobjectrequired
6 child fields
slugstringrequired
namestringrequired
descriptionstring, nullablerequired
categorystringrequired
prioritynumberrequired
addonobjectrequired
3 child fields
slugstringrequired
namestringrequired
icon_namestring, nullablerequired
countsobjectrequired
3 child fields
pendingnumberrequired
acceptednumberrequired
dismissednumberrequired
curl -G "https://www.membber.com/api/v1/moments" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "moments": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "status": "<status>",
      "confidence_score": 1,
      "confidence_breakdown": {},
      "target_entity_type": "<target_entity_type>",
      "target_entity_id": "c98b49c9-0000-4000-8000-d0c5000000c9",
      "context": {},
      "suggested_action": {},
      "expires_at": "<expires_at>",
      "created_at": "<created_at>",
      "definition": {
        "slug": "<slug>",
        "name": "Example name",
        "description": "Added at the front desk",
        "category": "<category>",
        "priority": 1,
        "addon": {
          "slug": "<slug>",
          "name": "Example name",
          "icon_name": "<icon_name>"
        }
      }
    }
  ],
  "counts": {
    "pending": 1,
    "accepted": 1,
    "dismissed": 1
  }
}

Dismiss a surfaced moment (optionally with a reason).

Merchant dismisses one of the AI-surfaced moments for their store. This is a SOFT dismiss: the moment keeps status 'pending' (so it can still be accepted later) and records an optional dismissed_reason that feeds future moment-quality tuning. Only a still-pending moment can be dismissed; an already-accepted one rejects. Faithful migration of the legacy POST /api/ios/moments/[id]/dismiss.

Parameters

momentIdstringpathrequired

Request body

store_idstring · uuidrequired

Store the moment belongs to (also authorises the merchant).

reasonstringoptional

Optional dismissal reason. Known values: 'not_relevant', 'already_contacted', 'too_frequent', 'not_worth_effort', 'customer_not_trustworthy', 'other'. Any other text is stored (truncated to 500 chars).

Response, 200

momentobjectrequired
5 child fields
idstringrequired
store_idstringrequired
statusstringrequired
dismissed_reasonstring, nullablerequired
updated_atstring, nullablerequired
messagestringrequired
curl -X POST "https://www.membber.com/api/v1/moments/ea770b3b-0000-4000-8000-d0c5000000ea/dismiss" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066"
  }'
Response, 200
{
  "moment": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "status": "<status>",
    "dismissed_reason": "Added at the front desk",
    "updated_at": "<updated_at>"
  },
  "message": "Added at the front desk"
}
WhatsApp
Book a Call
Start Free