Endpoint Details
PATCH
/api/v0/customers/{id}
Idempotency: Supported (recommended for updates)
Rate Limiting: Subject to standard API rate limits
Authentication
All requests require API key authentication using the following headers:x-client-key
: Your application’s client keyx-client-secret
: Your application’s client secret
Idempotency
Include an idempotency key to ensure update operations are safely retryable:idempotency-key
: Include a unique UUID v4 in the header- Subsequent requests with the same key return the original response
- Keys expire after 24 hours
Path Parameters
Customer’s unique identifier (UUID)
Format: UUID v4
Example:
Format: UUID v4
Example:
"550e8400-e29b-41d4-a716-446655440000"
Request Parameters
All parameters are optional - include only the fields you want to update.Basic Information
Customer’s first name
Constraints: 1-100 characters
Example:
Constraints: 1-100 characters
Example:
"John"
Customer’s last name
Constraints: 1-100 characters
Example:
Constraints: 1-100 characters
Example:
"Smith"
Customer’s phone number with country code
Constraints: Max 20 characters, valid format
Example:
Constraints: Max 20 characters, valid format
Example:
"+1-987-654-3210"
Customer’s email address
Constraints: Valid email format, max 255 characters, must be unique
Example:
Constraints: Valid email format, max 255 characters, must be unique
Example:
"john.smith@newcompany.com"
Account Settings
Type of customer account
Values:
Example:
Values:
"Individual"
, "Startup"
, "Small Business"
, "Medium Business"
, "Enterprise"
, "Non-Profit"
, "Government"
Example:
"Enterprise"
Customer account status
Values:
Example:
Note: Status changes may require additional verification
Values:
"ACTIVE"
, "BLACKLISTED"
, "DEACTIVATED"
Example:
"ACTIVE"
Note: Status changes may require additional verification
Request Examples
Response Format
Success Response (200 OK)
Response Fields
Unique customer identifier (unchanged)
Updated first name
Updated last name
Updated email address
Updated phone number
Updated customer type
Updated customer status
Last transaction amount (unchanged)
Last purchase date (unchanged)
Associated application ID (unchanged)
Customer creation timestamp (unchanged)
Updated timestamp reflecting the modification
Error Responses
Business Logic
Partial Updates
- Only include fields you want to update
- Unchanged fields retain their current values
- Empty string values are treated as clearing the field (where applicable)
Email Uniqueness
- Email addresses must be unique within your application scope
- Updating to an existing email will result in a 409 Conflict error
- Setting email to
null
or empty string clears the email field
Status Changes
- Status changes are logged for audit purposes
- Some status changes may trigger additional business logic
- Changing from
BLACKLISTED
toACTIVE
may require additional verification
Automatic Fields
updatedAt
is automatically set to the current timestampid
,createdAt
, and transaction-related fields cannot be modifiedappId
remains unchanged and scoped to your application
Use Cases
1. Profile Updates
Allow customers to update their own profile information through your application.2. Administrative Corrections
Customer service representatives can correct customer information.3. Account Upgrades
Update customer type when business accounts upgrade their service level.4. Status Management
Manage customer access by updating their account status.5. Data Migration
Bulk update customer records during data migration or cleanup operations.Best Practices
1. Validate Before Updating
Always validate data client-side before making API calls to reduce errors.2. Use Idempotency Keys
Include idempotency keys for update operations to ensure safe retries.3. Handle Conflicts Gracefully
Implement proper handling for email uniqueness conflicts.4. Partial Updates Only
Only send fields that actually need to be updated to minimize conflicts.5. Audit Trail
Log customer updates in your application for audit and compliance purposes.6. Status Change Notifications
Notify customers when their account status changes significantly.Related Endpoints
- Create Customer - Create new customer records
- List Customers - Get customers with filtering
- Fetch Customer - Get specific customer details
- Blacklist Customer - Blacklist customer access
- Delete Customer - Remove customer records
Support
For technical support or questions about updating customers:- Ensure customer ID is a valid UUID v4 format
- Check validation rules for field constraints
- Verify email uniqueness before updates
- Contact support with specific customer IDs that cause issues
For more information, see: