PATCH /customer/profile
/api/store/[slug]/customer/profileUpdates the signed-in customer's profile fields (name, phone, default shipping address, marketing opt-in); only provided fields change.
Path parameters
slugstringrequiredBusiness store slug (non-empty string); 404 if no business matches.
Body parameters
first_namestringoptionalFirst name, trimmed, max 100 characters.
last_namestringoptionalLast name, trimmed, max 100 characters.
phonestringoptionalPhone in E.164 format (regex ^\+?[1-9]\d{1,14}$), max 20 characters.
default_shipping_addressobjectoptionalUS-only address object: street_line_1 (required, max 255), street_line_2 (optional, max 255), city (required, max 100), state (required, 2-50 chars), postal_code (required, US ZIP regex ^[0-9]{5}(-[0-9]{4})?$), country (required, 2-letter code, must be 'US').
marketing_opt_inbooleanoptionalWhether the customer opts in to marketing.
Responses
The request succeeded.
A field failed validation. The response names the fields that failed, not just the first.
Something failed on our side. The response carries no detail; retry is safe on a GET.
What comes back
200: { success: true, profile: { id, first_name, last_name, phone, default_shipping_address, marketing_opt_in, created_at, updated_at } }. 400 validation errors return { success: false, error: 'Validation failed', details: { fieldPath: message } }. Returns 500 'Failed to update profile' when no profile row exists yet - GET /customer/profile auto-creates the row on first access.