login Mutation
Description
Authenticates a user with email and password.
mutation login($email: String!, $password: String!, $checkoutId: String) {
login(email: $email, password: $password, checkoutId: $checkoutId) {
session {
_id
jwt
expires
}
sessionsCount
checkout {
_id
id
configRef
origin
created
orderId
updated
expires
status
message
useSingleAddress
}
}
}
Variables
{
"email": "email@example.com",
"password": "password",
"checkoutId": "checkoutId"
}
Response
{
"login": {
"session": {
"_id": "2f531f8988f57d4046dd3a1b",
"jwt": "example",
"expires": 1736214725595
},
"sessionsCount": 42,
"checkout": {
"_id": "2874754000b5ab1c115d3cd1",
"id": "W1R-DRAG0",
"configRef": "425f067d5b572d16a0d0f156",
"origin": "example",
"created": 1770285407862,
"orderId": "example",
"updated": 1792068887407,
"expires": 1758265789373,
"status": "example",
"message": "example",
"useSingleAddress": true
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
email | String! | User's email address. |
password | String! | User's password. |
checkoutId | String | Optional checkout identifier to associate with the session. |