Retrieve customer profile information

  • Customers
  • Customer account
  • 1 route
How do I access the detailed profile of an authenticated customer?

This scenario explains how to retrieve the detailed profile of an authenticated customer from the customer scope.

Overview

Use GET/v1/customers/{customer_id}/profile to expose the customer profile, identity details, contact information, address, loyalty data, and opt-in status when the caller is authorized to act in the customer scope.

Prerequisites

  • customer_id must identify an existing customer.
  • authorization, accept-language, and x-api-key are required.
  • The issuer and customer scope must match the requested customer profile.
1

Retrieve the customer profile

Mandatory

Use GET/v2/customers/{customer_id}/profile to retrieve the detailed customer profile before a customer-scoped action or display.

Prerequisites

Prepare customer_id. Keep x-api-key and, when the route is customer-scoped, a valid bearer token.

Calling CURL

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.clubmed.com/v2/customers/{customer_id}/profile?date_format=Y-m-d"

Example answer

{
  "id": "customer-1",
  "email": "jane@example.com",
  "language": "fr-FR",
  "phone": "+33600000000"
}

info: Reuse loyalty, locale, and contact data when the next customer step needs to display or prefill profile information.


Response codes

  • 200 OK: the expected data is returned.
  • 400 Bad Request: the request is invalid or incomplete.
  • 401 Unauthorized: the token is missing or invalid.
  • 403 Forbidden: access is denied in this context.
  • 404 Not Found: the requested resource cannot be found.
GET/v2/customers/{customer_id}/profile
See more