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": "17302e67ad89bbf3eccf019d",
"jwt": "example",
"expires": 1739480532651
},
"sessionsCount": 42,
"checkout": {
"_id": "1284ad0404e0ab1fc0fd4217",
"id": "gMP-myczT",
"configRef": "66fac195a7412550abf21be4",
"origin": "example",
"created": 1759187690367,
"orderId": "example",
"updated": 1750563424700,
"expires": 1749281333834,
"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. |