Identify a customer from personal information

  • Customers
  • Customer account
  • 2 routes
How do I identify a customer from personal filters and open the detailed profile?

This scenario documents how to find a customer from personal information and then retrieve the detailed customer profile. It is useful for customer service, advisor tooling and authenticated customer journeys that need to identify an account before reading profile data.

The flow first queries the customer list with personal filters such as name, email, phone number or birthdate, then reuses the returned customer_id to open the detailed profile.

Overview

This scenario helps an application search for an existing customer account before retrieving the detailed profile linked to the selected customer_id.

Prerequisites

  • A valid bearer token and x-api-key.
  • At least one relevant personal filter to narrow the search.
  • The detail step also requires an accept-language header and the customer_id returned by the search step.

Expected result

The application can identify a matching customer, capture the returned customer_id and display the detailed profile with contact, loyalty and locale information.

Process workflow

Legend:
Mandatory
Optional
1

Search a customer with personal filters

Mandatory

Use this route to search the customer base from personal information before selecting one account to inspect in detail.

Prerequisites

  • Send authorization and x-api-key.
  • Prepare at least one relevant personal filter such as last_name, email, phones.number or birthdate.
  • Optionally add limit, page or offer_code to refine the result set.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v1/customers?filter=last_name==Smith&limit=10&page=1' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer YOUR_TOKEN' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "id": "123456789",
    "gm_number": "123456789",
    "first_name": "John",
    "last_name": "Smith",
    "birthdate": "19800117",
    "email": "john@h.fr",
    "phones": [
      {
        "number": "0623456789",
        "type": "MOBILE"
      }
    ],
    "loyalty_program": {
      "status": "EXCLUDED",
      "points": 1200
    }
  }
]

info: Combine two personal filters when possible to reduce ambiguity before opening the detailed profile.


Response codes

  • OK Response (200): returns the customer list matching the provided personal filters.
  • Error (400): the filter syntax or another input value is invalid.
  • Error (401): authentication is missing, invalid or expired.
  • Error (404): non documented in Swagger.
GET/v1/customers
See more
2

Consult the customer's detailed profile

Mandatory

Use GET/v2/customers/{customer_id}/profile to retrieve the detailed profile of the customer selected in the search step.

Prerequisites

  • Reuse the customer_id returned by the search step.
  • Send accept-language, authorization, and x-api-key.
  • Call this step after confirming that the selected customer is the right one.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v2/customers/123456789/profile' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'authorization: Bearer YOUR_TOKEN' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

{
  "email": "tom@example.com",
  "gm_number": "123456789",
  "first_name": "Tom",
  "second_name": "James",
  "third_name": "Edward",
  "last_name": "Smith",
  "birth_city": "Paris",
  "phones": [
    {
      "number": "0623456789",
      "type": "MOBILE"
    }
  ],
  "loyalty_program": {
    "status": "GOLD",
    "previous_status": "SILVER",
    "is_platinum_for_life": false,
    "points": 1200
  },
  "address": {
    "city": "Aix-en-Provence",
    "zip_code": "75000",
    "country_code": "FR"
  },
  "locale": "fr-FR"
}

info: v2 remains the best source to confirm identity, contact data, and loyalty details once a matching customer has been found.


Response codes

  • OK Response (200): returns the detailed customer profile for the selected account.
  • Error (400): request validation failed or one input value is malformed.
  • Error (401): authentication is missing, invalid, or expired.
  • Error (403): access to this customer profile is forbidden for the current context.
  • Error (404): the customer profile was not found.
GET/v2/customers/{customer_id}/profile
See more