m2pfintech
API LibraryCustomer

Search Customers by Criteria

Searches for customers using various search criteria. Returns a paginated list of matching customer profiles.

Search Types

TypeDescriptionExample Value
MOBILESearch by mobile number9876543210
KITSearch by card kit number20003255
CUSTOMER_IDSearch by customer ID9932482
ENTITY_IDSearch by entity ID617713338570000051250925
CARDSearch by masked card number876541XXXXXX0682
PANSearch by PAN numberABCDE1234F
AADHAAR_IDSearch by Aadhaar numberXXXX-XXXX-1234
EMAIL_IDSearch by emailjohn@example.com
FIRST_NAMESearch by first nameJohn
LAST_NAMESearch by last nameDoe
KYC_TOKENSearch by KYC tokenTOKEN123
CUSTOMER_ENTITY_IDSearch by customer entityCUST_ENT_001
VOTER_IDSearch by voter IDABC1234567
POST
/v1/customers/support/fetch-customer-list

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Query Parameters

pageNo?integer

Page number (0-indexed)

Default0
pageSize?integer

Records per page

Default10

Request Body

application/json

searchType*string

Required. Type of search criteria

Value in"MOBILE" | "KIT" | "CUSTOMER_ID" | "ENTITY_ID" | "CARD" | "PAN" | "AADHAAR_ID" | "VOTER_ID" | "EMAIL_ID" | "FIRST_NAME" | "LAST_NAME" | "KYC_TOKEN" | "CUSTOMER_ENTITY_ID"
value*string

Required. Search value

Length1 <= length
tenant*string

Required. Tenant identifier

Length1 <= length
countryCode?string

Country code (for MOBILE search)

Default"91"

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/customers/support/fetch-customer-list" \  -H "Content-Type: application/json" \  -d '{    "searchType": "MOBILE",    "tenant": "ACME_CORP",    "value": "9876543210"  }'
{
  "result": {},
  "pagination": {
    "list": true,
    "pageSize": 0,
    "pageNo": 0,
    "totalPages": 0,
    "totalElements": 0
  }
}
{
  "type": "https://www.m2pfintech.com/problem/constraint-violation",
  "title": "Method argument not valid",
  "status": 400,
  "message": "error.validation",
  "fieldErrors": [
    {
      "field": "tenant",
      "message": "must not be blank"
    },
    {
      "field": "searchType",
      "message": "must not be null"
    },
    {
      "field": "value",
      "message": "must not be blank"
    }
  ]
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Customer does not exists for id",
  "status": 409,
  "detail": "Customer does not exists for id",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}

Fetch Customer Details by Search Criteria POST

Searches for and retrieves customer details based on a flexible search criteria. This is the primary customer lookup API that supports searching by mobile number, kit number, entity ID, PAN, email, and other identifiers. ### When to Use - **Customer Support**: Look up a customer using whatever identifier they provide - **Pre-Transaction Validation**: Verify customer existence before initiating operations - **Profile Display**: Fetch customer details to display in your app or portal ### Response Returns comprehensive customer details including: - Personal information (name, DOB, gender, email, mobile) - KYC details and status - Card details (kit number, card status, product type) - Account/wallet information - Address details ### Important Notes - The response structure includes nested card and wallet details - For customers with multiple cards, all cards are included in the response - PAN and Aadhaar numbers are masked in the response for security

Get Customer Usage Details (LRS Limits) POST

Retrieves the customer's transaction usage/limits consumed, aggregated by base currency and transaction type. This is critical for forex operations to track **LRS (Liberalised Remittance Scheme)** limits. ### Use Cases - Check how much of the ₹7 lakh LRS limit has been consumed - Validate load eligibility before initiating forex card load - Display usage summary in partner app ### Response Structure Returns usage broken down by: - **Base currency** (USD, INR, etc.) - **Transaction type** (LOAD, LOAD_DIY, etc.) - **Time period** (daily, monthly, yearly, overall)