Skip to main content

Overview

The Store Customers API enables customers to create accounts, manage their profile, addresses, and view their order history. Base Path: /store/customers Source: packages/medusa/src/api/store/customers/route.ts

Register Customer

Create a new customer account.

Request Body

string
required
The customer’s email address.
string
required
The customer’s password.
string
The customer’s first name.
string
The customer’s last name.
string
The customer’s phone number.
string
The customer’s company name.

Request

Response

Source: packages/medusa/src/api/store/customers/route.ts:11
This endpoint returns an error if the request is already authenticated as a customer (see line 19-24). Users must log out before creating a new account.

Authenticate

After registration, authenticate to obtain a JWT token. See Authentication for details.

Get Current Customer

Retrieve the authenticated customer’s profile.

Request

Response

Requires authentication. Include the JWT token in the Authorization header.

Update Customer

Update the authenticated customer’s profile.

Request Body

string
Update email address.
string
Update first name.
string
Update last name.
string
Update phone number.
string
Update company name.
object
Update custom metadata.

Request

Response

Customer Addresses

List Addresses

Retrieve all addresses for the authenticated customer.

Request

Response

Create Address

Add a new address to the customer’s account.

Request Body

string
First name for the address.
string
Last name for the address.
string
Company name.
string
required
Address line 1.
string
Address line 2.
string
required
City name.
string
State or province.
string
required
Postal or ZIP code.
string
required
Two-letter ISO country code (e.g., “us”).
string
Phone number.
boolean
Set as default shipping address.
boolean
Set as default billing address.
object
Custom metadata.

Request

Response

Update Address

Update an existing address.

Path Parameters

string
required
The address ID to update.

Request Body

Accepts the same fields as Create Address, all optional.

Request

Delete Address

Remove an address from the customer’s account.

Request

Response

Customer Orders

List Orders

Retrieve all orders for the authenticated customer.

Query Parameters

number
default:"15"
Maximum number of orders to return.
number
default:"0"
Number of orders to skip.
string
Comma-separated list of fields to include.

Request

Response

Password Management

Request Password Reset

Request a password reset token.

Request Body

string
required
The customer’s email address.

Request

A password reset email will be sent to the customer with a reset token.

Update Password

Update password using a reset token.

Request Body

string
required
The customer’s email address.
string
required
The reset token from email.
string
required
The new password.

Change Password (Authenticated)

Change password for the authenticated customer.

Request Body

string
required
Current password.
string
required
New password.

Request

Next Steps

Authentication

Learn about customer authentication

Order Module

Learn about order management