Customers API¶
Manage customer account information.
Endpoints¶
Get Customer Info¶
Retrieve customer account details.
Endpoint: POST /api/v1/customers/info/{customer_id}
Authentication: Required (JWT)
Path Parameters:
- customer_id (integer): Customer ID
Success Response (200):
Example cURL:
Update Customer¶
Update customer account details.
Endpoint: PATCH /api/v1/customers/{customer_id}
Authentication: Required (JWT)
Path Parameters:
- customer_id (integer): Customer ID
Request Body (all fields optional):
Success Response (200):
Example cURL:
curl -X PATCH http://localhost:8080/api/v1/customers/1 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "newemail@example.com"
}'
Data Model¶
interface Customer {
id: number;
email: string;
username: string;
// password_hash not returned in responses
}