Skip to content
ShopAssist Docs
APIAPI referenceLeads and back in stock

List Leads

Leads with their consent records (newest first).

GET/v1/stores/{store_id}/leadsScope leads:read

Leads with their consent records (newest first).

Parameters

Parameters of List Leads
NameInTypeDescription
store_idrequiredpathstring
updated_sincequerystring | null
newsletter_statusquery"none" | "pending_confirmation" | "confirmed" | "unsubscribed" | null
limitqueryintegerPage size
cursorquerystring | nullCursor from the previous page

Example request

curl -X GET "https://api.shopassist.coec.dk/v1/stores/sto_01j8000000e008000000000000/leads" \
  -H "Authorization: Bearer $SHOPASSIST_API_KEY"

Response 200 (Page_Lead_)

Response of List Leads
FieldTypeDescription
datarequiredLead[]
data[].confirmed_atrequiredstring | nullformat date-time
data[].consentsrequiredConsentRecordView[]
data[].consents[].confirmed_atrequiredstring | nullformat date-time
data[].consents[].consent_textrequiredstring
data[].consents[].consent_text_versionrequiredstring
data[].consents[].created_atrequiredstringformat date-time
data[].consents[].idrequiredstringpattern `^cns_[0-9a-hjkmnp-tv-z]{26}$`
data[].consents[].is_grantedrequiredboolean
data[].consents[].localerequiredstring
data[].consents[].purposerequiredstring (enum)one of newsletter, marketing_email, back_in_stock, transcript_email, handoff_share, analytics, preferences
data[].consents[].sourcerequiredstring (enum)one of widget_form, chat, cmp, double_opt_in, unsubscribe, dashboard, api
data[].consents[].withdrawn_atrequiredstring | nullformat date-time
data[].conversation_idrequiredstring | nullpattern `^conv_[0-9a-hjkmnp-tv-z]{26}$`
data[].created_atrequiredstringformat date-time
data[].emailrequiredstring
data[].idrequiredstringpattern `^lead_[0-9a-hjkmnp-tv-z]{26}$`
data[].localerequiredstring | null
data[].namerequiredstring | null
data[].newsletter_statusrequired"none" | "pending_confirmation" | "confirmed" | "unsubscribed"
data[].platform_sync_statusrequired"not_required" | "pending" | "synced" | "failed"
data[].purposesrequired("newsletter" | "contact_request" | "back_in_stock" | "transcript")[]
data[].sourcerequired"lead_form" | "chat_tool" | "handoff" | "back_in_stock"
data[].unsubscribed_atrequiredstring | nullformat date-time
has_morerequiredboolean
next_cursorrequiredstring | nullOpaque cursor for the next page; null on the last page
{
  "data": [
    {
      "confirmed_at": "2026-09-28T10:15:30.123Z",
      "consents": [
        {
          "confirmed_at": "2026-09-28T10:15:30.123Z",
          "consent_text": "string",
          "consent_text_version": "string",
          "created_at": "2026-09-28T10:15:30.123Z",
          "id": "cns_01j8000000e008000000000000",
          "is_granted": true,
          "locale": "da-DK",
          "purpose": "newsletter",
          "source": "widget_form",
          "withdrawn_at": "2026-09-28T10:15:30.123Z"
        }
      ],
      "conversation_id": "conv_01j8000000e008000000000000",
      "created_at": "2026-09-28T10:15:30.123Z",
      "email": "string",
      "id": "lead_01j8000000e008000000000000",
      "locale": "da-DK",
      "name": "string",
      "newsletter_status": "none",
      "platform_sync_status": "not_required",
      "purposes": [
        "newsletter"
      ],
      "source": "lead_form",
      "unsubscribed_at": "2026-09-28T10:15:30.123Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}

Errors

Every error uses the error envelope; the code field is stable.

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 422 Unprocessable Content
  • 429 Too Many Requests

Last updated on