AcrossFlow Start free

New mini program: look up members by mobile or email

For members who open the new mini program without a jump: look up their old balances by a verified mobile number or email address, credit them, and report the migration.

MethodURLCalled byAuthentication
POSThttps://open.acrossflow.com/v1/mp/lookupNew mini program's backendRedeem token
POSThttps://open.acrossflow.com/v1/mp/migratedNew mini program's backendRedeem token

When a member opens the new mini program directly, without a jump, the new mini program's backend can use the member's verified mobile number or email address to look up their points and stored value from the old mini program. After the member confirms, it credits them and reports the migration by memberId. Only members whose imported record includes a mobile number or email address can be found. For authentication, response structure, and common error codes, see the API overview.

Call sequence

MemberNew mini programNew backendAcrossFlow
  1. Sign in and verify a mobile or email
  2. Session and the verified value
  3. /v1/mp/lookup
  4. Matching members, possibly several
  5. List the members
  6. Confirm which one
  7. /v1/mp/migrated after crediting
Look up verified mobiles or emails only. When several members match, the member confirms; never choose automatically.
  1. The member signs in to the new mini program, and the backend gets their OpenID in the new mini program.
  2. The new mini program verifies the member's mobile number or email address, for example with an SMS or email code, or WeChat's phone number verification component.
  3. The backend calls /v1/mp/lookup with the verified value.
  4. If more than one member is returned, the member confirms which one is theirs.
  5. After crediting the member, the backend calls /v1/mp/migrated with the memberId; see Report a migration.
Send verified values only

This endpoint returns the balances and contact details of members matching the mobile number or email address it receives, and does not check that the caller verified it. Lookups with unverified values would let anyone who types in someone else's number see and claim their points and stored value.

Look up members

POST https://open.acrossflow.com/v1/mp/lookup
Authorization: Bearer aft_…
Content-Type: application/json

{ "mobile": "+85291234567" }

Request parameters

FieldTypeRequiredDescription
mobilestringOne ofThe member's verified mobile number; see Data types for the format
emailstringOne ofThe member's verified email address; see Data types for the format

Response

{
  "ok": true,
  "members": [
    {
      "memberId": "mem_…",
      "name": "…",
      "points": 12050,
      "balance": 3000,
      "mobile": "+85291234567",
      "email": null,
      "extra": { "coupons": "2 × $20 off $100" },
      "status": "pending",
      "migratedAt": null,
      "migratedOpenId": null
    }
  ]
}
FieldTypeDescription
membersarrayMatching members in import order; an empty array if none match
members[]objectSame structure as the member returned by the redeem endpoint; see Redeem a jump token

Notes

  • Matching is exact. Email addresses are case-insensitive. Partial or fuzzy matching is not supported.
  • Matching uses the mobile numbers and email addresses in member records: those the merchant imported, and those added by jump-based migration reports.
  • One mobile number or email address can belong to several members, for example a number shared by a family. Show details such as name and points and let the member confirm which record is theirs. Never pick or merge records automatically.
  • This endpoint is read-only and does not change a member's status. The status becomes migrated only after a migration report.
  • Credit each member only once; this is the caller's responsibility. The member may already have been credited through a jump. Before crediting, check the memberId against your own records. status and the other migration fields are for reference only.
  • Each Redeem token can look up 60 times per minute; see Rate limits.

Error codes

Error codes specific to this endpoint. For common error codes, see the API overview.

HTTPerrorDescription
400invalidNeither or both of mobile and email were sent, or the value is malformed
402pausedThe merchant's account is over its plan limits and the grace period has ended; lookups are paused
403channelThe token's channel no longer exists
429rate_limitedThis Redeem token has made 60 lookups in the last 60 seconds