PUT api/Session
Starts or logs in a session. With no session token and no email: creates an anonymous session, whose basket can be filled before the customer logs in. With no token, and an email and password: logs in, returning the customer's session. With a token, and an email and password: logs that session in as the customer, keeping its basket. With a token and no email: returns that session unchanged. An error (500) if the email or password is wrong.
Request Information
URI Parameters
None.
Body Parameters
The customer's email and password. Leave it out, or leave Email empty, for an anonymous session.
SessionRequest| Name | Description | Type | Additional information |
|---|---|---|---|
|
The customer's email address, which is their login name. Leave it empty for an anonymous session. |
string |
None. |
|
| Password |
The customer's password. |
string |
None. |
Request Formats
application/json, text/json
{
"email": "sample string 1",
"password": "sample string 2"
}
Response Information
Resource Description
The session. Send its Id as the bearer token from now on.
Session| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
The session ID, used as the bearer token. |
globally unique identifier |
None. |
| User |
The customer the session is logged in as, if any. |
User |
None. |
Response Formats
application/json, text/json
Sample not available.