...
Method | GET or POST | Comments | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Description | logs in a customer and returns their base information (MyAccount object) | There are two ways to login: GET or POST. For the GET, the three parameters are submitted. For POST, a CustomerCredentials object is submitted (it's a simple object with three fields). | |||||||||
Cookies |
| not required, but if passed along and valid, the same shopping cart will continue to be used. Otherwise, a new cart is created and Set-Cookie headers will accompany a successful login. | |||||||||
Path Parameters | none | ||||||||||
Query Parameters | For GET:
password For POST: none | ||||||||||
Headers | none | ||||||||||
Receives Json | CustomerCredentials | ||||||||||
Returns Json | MyAccount object if successful | A failed login will result in a 401 Unauthorized http status. Any missing parameers will result in a 400 Bad Request http status. | |||||||||
Example |
|
/rest/myaccount/logout
Method | GET or POST | Comments | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Description | logs out a customer |
| |||||||||
Cookies |
| used to determine which customer to logout | |||||||||
Path Parameters | none | ||||||||||
Query Parameters | none | ||||||||||
Headers | none | ||||||||||
Receives Json | none | ||||||||||
Returns Json | none |
| |||||||||
Example |
|
/rest/myaccount/changePassword
Method | POST | Comments | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Description | Updates password | This is the only way for a user to change their password | |||||||||
Cookies |
| The customer must be successfully logged in to change their password. | |||||||||
Path Parameters | none | ||||||||||
Query Parameters | none | ||||||||||
Headers | none | ||||||||||
Receives Json | ChangePasswordRequest | ||||||||||
Returns Json | nothing (204 on success) | A failed login will result in a 401 Unauthorized http status. Any missing parameers will result in a 400 Bad Request http status. Any parameters too long will result in a 400 Bad Request http status | |||||||||
Example |
|
...