Skip to main content

Get Customer Profile (Customer)

Retrieves complete profile information for a customer.

Path Parameters

customerId
string (uuid)
required
Customer identifier (must match authenticated user)

Response

id
string (uuid)
Customer identifier
email
string
Customer email address
firstName
string
Customer first name
lastName
string
Customer last name
phoneNumber
string
Customer phone number
address
object
Customer address details
birthDate
string (date)
Customer date of birth
createdAt
string (datetime)
Account creation timestamp

Response Codes

  • 200 OK - Profile retrieved successfully
  • 404 Not Found - Customer not found

Examples

curl -X GET "https://your-server.com/api/customers/customer-uuid" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Success Response

{
  "id": "customer-uuid",
  "email": "[email protected]",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+1-555-123-4567",
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "country": "USA"
  },
  "birthDate": "1990-01-15",
  "createdAt": "2024-01-01T10:00:00Z"
}

Update Full Name (Customer)

Updates customer’s first and last name.

Path Parameters

customerId
string (uuid)
required
Customer identifier

Request Body

firstName
string
required
New first name
lastName
string
required
New last name

Response

firstName
string
Updated first name
lastName
string
Updated last name

Response Codes

  • 200 OK - Name updated successfully
  • 400 Bad Request - Invalid name format
  • 404 Not Found - Customer not found

Example

cURL
curl -X PATCH "https://your-server.com/api/customers/customer-uuid/full-name" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Jane",
    "lastName": "Smith"
  }'

Success Response

{
  "firstName": "Jane",
  "lastName": "Smith"
}

Update Phone Number (Customer)

Updates customer’s phone number.

Path Parameters

customerId
string (uuid)
required
Customer identifier

Request Body

phoneNumber
string
required
New phone number (format: +1-555-123-4567)

Response

phoneNumber
string
Updated phone number

Response Codes

  • 200 OK - Phone number updated
  • 400 Bad Request - Invalid phone number format
  • 404 Not Found - Customer not found

Example

cURL
curl -X PATCH "https://your-server.com/api/customers/customer-uuid/phone-number" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumber": "+1-555-987-6543"}'

Update Address (Customer)

Updates customer’s address.

Path Parameters

customerId
string (uuid)
required
Customer identifier

Request Body

street
string
required
Street address
city
string
required
City
state
string
required
State/Province
zipCode
string
required
ZIP/Postal code
country
string
required
Country

Response

address
object
Updated address object

Response Codes

  • 200 OK - Address updated
  • 400 Bad Request - Invalid address data
  • 404 Not Found - Customer not found

Example

cURL
curl -X PATCH "https://your-server.com/api/customers/customer-uuid/address" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "street": "456 Oak Avenue",
    "city": "Los Angeles",
    "state": "CA",
    "zipCode": "90001",
    "country": "USA"
  }'

Success Response

{
  "street": "456 Oak Avenue",
  "city": "Los Angeles",
  "state": "CA",
  "zipCode": "90001",
  "country": "USA"
}

Update Birth Date (Customer)

Updates customer’s date of birth.

Path Parameters

customerId
string (uuid)
required
Customer identifier

Request Body

birthDate
string (date)
required
Date of birth (format: YYYY-MM-DD)

Response

birthDate
string (date)
Updated birth date

Response Codes

  • 200 OK - Birth date updated
  • 400 Bad Request - Invalid date format or future date
  • 404 Not Found - Customer not found

Example

cURL
curl -X PATCH "https://your-server.com/api/customers/customer-uuid/birth-date" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"birthDate": "1985-06-15"}'

Success Response

"1985-06-15"

Profile Management Tips

Keep your profile information up to date to ensure accurate order delivery and communication.
Email address changes must be done through the Account Management endpoints for security reasons.

Data Validation

All profile updates are validated:
  • Names: Must be non-empty, reasonable length
  • Phone: Must match international format
  • Address: All fields required for shipping
  • Birth Date: Must be in the past, valid date format

Privacy

Customer profile data is:
  • Encrypted at rest
  • Only accessible by the authenticated customer
  • Used only for order fulfillment and communication
  • Not shared with third parties without consent

Build docs developers (and LLMs) love