Sign in
POST
/api/website/customers/login
const url = 'https://api.petanqueai.com/api/website/customers/login';const options = { method: 'POST', headers: { 'x-storefront-token': '<x-storefront-token>', 'Content-Type': 'application/json' }, body: '{"email":"hello@example.com","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.petanqueai.com/api/website/customers/login \ --header 'Content-Type: application/json' \ --header 'x-storefront-token: <x-storefront-token>' \ --data '{ "email": "hello@example.com", "password": "example" }'Checks email and password and returns a session token valid for 30 days, with its expiresAt. Send the token in the x-customer-session header on Signed-in shopper routes. It is returned in the body only; no cookie is set.
Every failure answers the same 401, whatever the cause. Limited to 10 attempts per address per 15 minutes.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
email
required
string format: email
password
required
string
Example generated
{ "email": "hello@example.com", "password": "example"}object
email
required
string format: email
password
required
string
Example generated
email=hello%40example.com&password=exampleobject
email
required
string format: email
password
required
string