Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
public
/
auth
/
login
Start customer login
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/public/auth/login \
  --header 'Content-Type: application/json' \
  --header 'X-Scalev-Storefront-Api-Key: <x-scalev-storefront-api-key>' \
  --data '
{
  "email": "jsmith@example.com",
  "password": "<string>",
  "login_as": "customer"
}
'
{
  "access": "<string>",
  "refresh": "<string>",
  "token_type": "Bearer",
  "expires_in": 900,
  "refresh_expires_in": 2592000,
  "store_unique_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.scalev.com/llms.txt

Use this file to discover all available pages before exploring further.

Header

X-Scalev-Storefront-Api-Key
string
wajib

Publishable storefront public API key for the target store.

Parameter Path

store_id
string
wajib

Store unique_id.

Body

application/json
email
string<email>
wajib
password
string
wajib
login_as
enum<string>
Opsi yang tersedia:
customer,
owner

Respons

Customer login tokens, or an OTP challenge message when the store requires OTP.

access
string
wajib

Customer access JWT. Send it as Authorization: Bearer <token> to /v3/stores/{store_id}/customers/me/*.

refresh
string
wajib

Refresh token for POST /v3/stores/{store_id}/public/auth/jwt/refresh.

token_type
enum<string>
wajib

Token type to use in the Authorization header.

Opsi yang tersedia:
Bearer
expires_in
integer
wajib

Access token lifetime in seconds.

Contoh:

900

refresh_expires_in
integer
wajib

Refresh token lifetime in seconds. Refresh tokens rotate on every refresh and are single-use.

Contoh:

2592000

store_unique_id
string | null

Public store unique ID returned by some OTP verification responses.