Customers API
Manage customer profiles, groups, and purchase history
15 endpoints
Base URL:
https://api.nexapay.com/v1| Method | Path | Description |
|---|---|---|
| GET | /customers | List all customers |
| POST | /customers | Create new customer |
| GET | /customers/{customer_id} | Get customer details |
| PUT | /customers/{customer_id} | Update customer |
| DELETE | /customers/{customer_id} | Delete customer |
| GET | /customers/search | Search customers |
| GET | /customers/phone/{phone} | Lookup by phone |
| GET | /customers/email/{email} | Lookup by email |
| GET | /customers/{customer_id}/orders | Get customer orders |
| GET | /customers/{customer_id}/transactions | Get transaction history |
| GET | /customers/{customer_id}/favorites | Get favorite items |
| GET | /customer-groups | List customer groups |
| POST | /customer-groups | Create customer group |
| POST | /customers/{customer_id}/groups | Add customer to group |
| DELETE | /customers/{customer_id}/groups/{group_id} | Remove from group |
Detailed Examples
POST
/customersRequest Body
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@email.com",
"phone": "+1-555-123-4567",
"birthday": "1990-05-15",
"address": {
"street": "789 Main St",
"city": "Las Vegas",
"state": "NV",
"zip": "89101"
},
"preferences": {
"marketing_emails": true,
"sms_notifications": true
},
"notes": "Prefers oat milk in coffee"
}Response
{
"success": true,
"data": {
"id": "cust_abc123",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@email.com",
"phone": "+1-555-123-4567",
"loyalty_points": 0,
"total_visits": 0,
"total_spent": 0,
"member_since": "2024-01-15",
"created_at": "2024-01-15T10:00:00Z"
}
}