Customers API
List customers
Section titled “List customers”GET /api/v1/customersAuthorization: Bearer <admin_token>Query parameters:
page,per_page— paginationsearch— search by email or name
Get customer
Section titled “Get customer”GET /api/v1/customers/:idAuthorization: Bearer <token>Create customer
Section titled “Create customer”POST /api/v1/auth/register{ "email": "john@example.com", "password": "securepassword123", "first_name": "John", "last_name": "Doe", "phone": "+12125551234"}Update customer
Section titled “Update customer”PATCH /api/v1/customers/:idAuthorization: Bearer <token>Customer addresses
Section titled “Customer addresses”GET /api/v1/customers/:id/addressesPOST /api/v1/customers/:id/addressesPATCH /api/v1/customers/:id/addresses/:address_idDELETE /api/v1/customers/:id/addresses/:address_idGet current customer
Section titled “Get current customer”GET /api/v1/customers/meAuthorization: Bearer <token>Returns the authenticated customer with addresses.
Customer roles
Section titled “Customer roles”| Role | Description |
|---|---|
customer | Default, can place orders |
admin | Full admin access |