POST
/
login
curl --request POST \
  --url https://sandbox-api.violet.io/v1/login \
  --header 'Content-Type: application/json' \
  --header 'X-Violet-App-Id: <x-violet-app-id>' \
  --header 'X-Violet-App-Secret: <x-violet-app-secret>' \
  --data '{
  "username": "<string>",
  "password": "<string>"
}'
{
  "id": 123,
  "first_name": "<string>",
  "last_name": "<string>",
  "password": "<string>",
  "email": "<string>",
  "type": "SUPER_ADMIN",
  "verified": true,
  "status": "inactive",
  "date_created": "2023-11-07T05:31:56Z",
  "date_last_modified": "2023-11-07T05:31:56Z",
  "roles": [
    {
      "name": "<string>",
      "permissions": [
        {
          "name": "<string>",
          "description": "<string>"
        }
      ]
    }
  ],
  "tos_accepted": true,
  "payment_configured": true,
  "privacy_policy_accepted": true,
  "country_code": "US",
  "token": "<string>",
  "refresh_token": "<string>",
  "merchant_id": 123,
  "merchant_ids": [
    123
  ],
  "store_url": "<string>"
}

Login to Violet using your App Secret and App Id, retrieved from channel.violet.io. This is required to receive an App Token, which is used to authenticate requests made to violet.

Headers

X-Violet-App-Secret
string
required

Please note that App Secrets are different depending on environment (test/live) please make sure you have retrieved the correct app secret from the Dashboard.

X-Violet-App-Id
integer
required

Body

application/json

Login Request

Response

default - application/json

default response

Login Response