Profile Management
Update customer profile, addresses, and preferences.
Updated
On this page
Get Profile
Retrieve the authenticated customer's profile:
import dash from "@/lib/dash"
const { customer } = await dash.auth.getProfile()
// customer = {
// id: "cust_abc123",
// email: "customer@example.com",
// first_name: "Jane",
// last_name: "Doe",
// phone: "555-0123",
// has_password: true,
// has_address: true,
// address: {
// address_line1: "123 Main St",
// city: "Austin",
// state: "TX",
// zip_code: "78701",
// country: "US"
// },
// loyalty_points: 250,
// tier: "gold",
// tier_name: "Gold Member"
// }
Update Profile
Update the customer's personal information. Only include the fields you want to change:
const { customer } = await dash.auth.updateProfile({
first_name: "Jane",
last_name: "Doe",
phone: "555-0123",
address_line1: "123 Main St",
address_line2: "Apt 4B",
city: "Austin",
state: "TX",
zip_code: "78701",
country: "US",
accepts_marketing: true,
})
Update Metadata
Store custom key-value data on a customer profile:
const { customer } = await dash.auth.updateMetadata({
preferred_strain: "indica",
birthday: "1990-05-15",
vip_note: "Prefers edibles",
})
Metadata is freeform JSON — use it for any custom data your storefront needs.
View Order History
Get the customer's past orders directly from the auth module:
const { orders, pagination } = await dash.auth.getOrders({ limit: 10 })
orders.forEach(order => {
console.log(order.order_number, order.status, order.total)
})
// Get a specific order's details
const { order } = await dash.auth.getOrder("ord_xyz789")
See Orders for more detail on order data.
REST API Endpoints
| Action | Method | Endpoint |
|---|---|---|
| Get Profile | GET | /storefront/auth/me |
| Update Profile | POST | /storefront/auth/profile |
| List Orders | GET | /storefront/auth/orders |
| Get Order | GET | /storefront/auth/orders/{order_id} |
All profile endpoints require a Bearer token in the Authorization header. See Base URL & Headers.
Next Steps
- Customer Addresses — Managing multiple addresses
- Customer Points — Loyalty points and tiers
- List Orders — Full order history details