# Authenticate a member

Authenticates a user and returns a JWT token. This token is used to authenticate the user for all other storefront requests. JWTs expire after 2 hours.

Endpoint: POST /v2.0/storefront/auth
Version: 2.0.0
Security: api_key

## Security:

  - `api_key` (unknown)
    apiKey in header X-Inveterate-Api-Key

## Request fields (application/json):

  - `merchantId` (string, required)
    Your merchantId. You can obtain this by calling the `GET merchant` endpoint.

  - `usrEmail` (string, required)
    The amount to be awarded upon sign-up.

  - `usrPasswd` (string, required)
    The name (appearance only) of this benefit.

## Response 200:

  - `200` (unknown)
    Returned upon successful direct action to our database. Action is immediate.

## Response 200 fields (application/json):

  - `message` (string, required)
    The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

  - `data` (object, required)
    The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

## Response 400:

  - `400` (unknown)
    Returned upon a malformed request. Check your API key, URL parameters, and body parameters when this error is returned. Generally, if you see this error, that also means NO action was taken on our backend.

## Response 400 fields (application/json):

  - `message` (string, required)
    The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

  - `data` (object, required)
    The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

## Response 500:

  - `500` (unknown)
    Returned for all other errors. Generally these come from our backend. Some multipart functions may execute somewhat and then fail, causing some data to be updated.

## Response 500 fields (application/json):

  - `message` (string, required)
    The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

  - `data` (object, required)
    The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

