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": "9532a32dc898c5a2654c948f",
"jwt": "example",
"expires": 1753226691602
},
"sessionsCount": 42,
"checkout": {
"_id": "30cf9ce9f9e0d2f1ea855c14",
"id": "adW-ce2Cg",
"configRef": "225f0550496700f10cb077a1",
"origin": "example",
"created": 1740415954409,
"orderId": "example",
"updated": 1733238115556,
"expires": 1758671117105,
"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. |