Customer Registration
Register a new customer account with Bagisto.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
firstName | String | ✅ Yes | Customer's first name |
lastName | String | ✅ Yes | Customer's last name |
email | String | ✅ Yes | Customer's email address (must be unique) |
password | String | ✅ Yes | Password for the account (min. 8 characters) |
passwordConfirmation | String | ✅ Yes | Password confirmation (must match password) |
Response
| Field | Type | Description |
|---|---|---|
customer | Customer | The created customer object |
accessToken | String | JWT token for API authentication |
refreshToken | String | Token to refresh access token |
message | String | Success or error message |
success | Boolean | Registration success status |
Validation Rules
- Email must be in valid format and unique
- Password must be at least 8 characters
- Password and password confirmation must match
- First name and last name are required
- Email cannot already exist in the system
Error Responses
json
{
"errors": {
"email": ["The email has already been taken."],
"password": ["The password must be at least 8 characters."]
}
}
