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": "b687c562e40efc08d6e22000",
"jwt": "example",
"expires": 1745120849359
},
"sessionsCount": 42,
"checkout": {
"_id": "a48df5037a0b167ea3e03ba6",
"id": "Yek-S9Hul",
"configRef": "a4b2f5fefc6e5009932301c3",
"origin": "example",
"created": 1744554331308,
"orderId": "example",
"updated": 1710124179062,
"expires": 1747395168994,
"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. |