Skip to main content
POST
/
auth
/
login
Login user
curl --request POST \
  --url http://localhost:3002/api/v1/auth/login \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "[email protected]",
  "password": "your_password"
}
'
{
  "success": true,
  "data": {
    "access_token": "<string>",
    "refresh_token": "<string>",
    "expires_in": 3600,
    "user": {
      "id": "user_123",
      "email": "[email protected]",
      "name": "John Doe",
      "role": "cashier"
    }
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Body

application/json
email
string<email>
required
password
string<password>
required
Example:

"your_password"

Response

Login successful

success
boolean
Example:

true

data
object