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": "95d8da4114a3af807b5bbb90",
"jwt": "example",
"expires": 1744671869368
},
"sessionsCount": 42,
"checkout": {
"_id": "6beefc4c888bd612218670d6",
"id": "VCc-wA5wo",
"configRef": "21751815c229b90eb04abf60",
"origin": "example",
"created": 1769705274277,
"orderId": "example",
"updated": 1707680408625,
"expires": 1717164799875,
"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. |