Postman + Login
/v1/login
This section takes you through using Postman to test the Violet APIs. Make sure you have already signed up at channel.violet.io/signup and created an application in the step prior. If you haven’t, please go through Create a Violet Application
The Violet Postman Collection is available here: Violet Postman Collection
If you would like to fork the collection into your Postman workspace, you can do so here: Fork Violet Postman Collection
You will need your App ID and App Secret in order to complete this step.
Login
This API tests your connection to Violet by logging into your Application. Add X-Violet-App-Id
and X-Violet-App-Secret
added to your headers for login. These are available from the application you created on channel.violet.io. Every request after login will require these header params for authentication, along with the X-Violet-Token
that you get from login and refreshing your token.
In addition to the headers mentioned above, include your username
(your username is the email you signed up with) and password
. If successful, an access token will be returned in the response body for use in additional requests against the API along with information about your API.
Params
HEADER PARAMETERS
The secret for your Violet App
The ID for your Violet App
BODY PARAMETERS
The email you signed up for Violet with.
Password used on signup
If you are using our Postman collection, you can add X-Violet-App-Id
and X-Violet-App-Secret
in the environment variables.
Refresh your Token
Use the Refresh Token to get a new token. This is an operation you will have to do on a regular basis. You can use your App Id and App Secret with a refresh token to get a new token. This saves the step of having to send your username and password each time to get a new token.
curl -s --request POST \
--url 'sandbox-api.violet.io/v1/login' \
--header 'X-Violet-App-Secret: APPSECRET' \
--header 'X-Violet-App-Id: APPID' \
--header 'Content-type: application/json' \
--data '{
"username": "",
"password": ""
}'
{
"id": 0,
"first_name": "string",
"last_name": "string",
"password": "string",
"email": "string",
"merchant_id": 0,
"type": "ADMIN",
"verified": false,
"status": "INACTIVE",
"date_created": "2022-03-23T14:25:41.517Z",
"date_last_modified": "2022-03-23T14:25:41.517Z",
"roles": [
{
"name": "string",
"description": "string",
"permissions": [
{
"name": "string",
"description": "string"
}
]
}
],
"token": "string",
"refresh_token": "string"
}
Headers
Response
Country Code
US
, AU
, AT
, BE
, CA
, DK
, FI
, FR
, DE
, HK
, IE
, IT
, JP
, LU
, MX
, NL
, NZ
, NO
, PT
, SG
, ES
, SE
, CH
, GB
, AF
, AX
, AL
, DZ
, AS
, AD
, AO
, AI
, AQ
, AG
, AR
, AM
, AW
, AZ
, BS
, BH
, BD
, BB
, BY
, BZ
, BJ
, BM
, BT
, BO
, BA
, BW
, BV
, BR
, IO
, BN
, BG
, BF
, BI
, KH
, CM
, CV
, KY
, CF
, TD
, CL
, CN
, CX
, CC
, CO
, KM
, CG
, CD
, CK
, CR
, CI
, HR
, CU
, CY
, CZ
, DJ
, DM
, DO
, EC
, EG
, SV
, GQ
, ER
, EE
, ET
, FK
, FO
, FJ
, GF
, PF
, TF
, GA
, GM
, GE
, GH
, GI
, GR
, GL
, GD
, GP
, GU
, GT
, GG
, GN
, GW
, GY
, HT
, HM
, VA
, HN
, HU
, IS
, IN
, ID
, IR
, IQ
, IM
, IL
, JM
, JE
, JO
, KZ
, KE
, KI
, KP
, KR
, KW
, KG
, LA
, LV
, LB
, LS
, LR
, LY
, LI
, LT
, MO
, MK
, MG
, MW
, MY
, MV
, ML
, MT
, MH
, MQ
, MR
, MU
, YT
, FM
, MD
, MC
, MN
, ME
, MS
, MA
, MZ
, MM
, NA
, NR
, NP
, AN
, NC
, NI
, NE
, NG
, NU
, NF
, MP
, OM
, PK
, PW
, PS
, PA
, PG
, PY
, PE
, PH
, PN
, PL
, PR
, QA
, RE
, RO
, RU
, RW
, SH
, KN
, LC
, PM
, VC
, WS
, SM
, ST
, SA
, SN
, RS
, SC
, SL
, SK
, SI
, SB
, SO
, ZA
, GS
, LK
, SD
, SR
, SJ
, SZ
, SY
, TW
, TJ
, TZ
, TH
, TL
, TG
, TK
, TO
, TT
, TN
, TR
, TM
, TC
, TV
, UG
, UA
, AE
, UM
, UY
, UZ
, VU
, VE
, VN
, VG
, VI
, WF
, EH
, YE
, ZM
, ZW
Date of creation
Date of last update
The users unique email address
The users first name
The users last name
Merchant ID
Merchant IDs
The users raw desired password
Is the Users Payment Settings Configured
Privacy Policy Accepted
Refresh Token
The status of the user
INACTIVE
, ACTIVE
, DISABLED
Store Url
Token
Terms of Service Accepted
The allowed values for the user type
ADMIN
, MERCHANT
, USER
, DEVELOPER
, INFLUENCER
If a user has verified their emailed address
curl -s --request POST \
--url 'sandbox-api.violet.io/v1/login' \
--header 'X-Violet-App-Secret: APPSECRET' \
--header 'X-Violet-App-Id: APPID' \
--header 'Content-type: application/json' \
--data '{
"username": "",
"password": ""
}'
{
"id": 0,
"first_name": "string",
"last_name": "string",
"password": "string",
"email": "string",
"merchant_id": 0,
"type": "ADMIN",
"verified": false,
"status": "INACTIVE",
"date_created": "2022-03-23T14:25:41.517Z",
"date_last_modified": "2022-03-23T14:25:41.517Z",
"roles": [
{
"name": "string",
"description": "string",
"permissions": [
{
"name": "string",
"description": "string"
}
]
}
],
"token": "string",
"refresh_token": "string"
}