Login
Description¶
The login endpoint is used to Sign in a user into the VELA application.
Request¶
Endpoint
/ui/v1/login
Method
POST
Header
Content-Type: application/json
Attributes
| ELEMENT | DESCRIPTION | FIELD CONSTRAINTS |
|---|---|---|
| Username | Required Can be username, email, or Mobile Number |
Username must be at least 8 characters long, contain at least one letter, and must not include special characters, non-printable characters, spaces, or tabs. |
| Password | Required | Depends on merchant-specific password policy |
| MerchantCode | Required specific code used for each merchant |
The value of merchantCode (e.g., vela-atlanta) must be the same as the value in the Base URL (e.g., https://vela-atlanta-test.payvela.com) |
| mobileCountryCallingCodeId | Conditional If mobile number is not unique |
Request Body : Login via Username
{
"userName": "johnsmith",
"password": "Password12#$!",
"merchantCode": "VELA"
}
Request Body : Login via Email address
{
"userName": "johnsmith@gmail.com",
"password": "Password12#$!",
"merchantCode": "VELA"
}
Request Body : Login via Mobile Number
{
"userName": "4567899876",
"password": "Password12#$!",
"merchantCode": "VELA"
}
Request Body : Login via Mobile Number - Multiple accounts with same mobile number
{
"password": "Vela12345^&!",
"userName": "123456789",
"merchantCode": "VELA",
"mobileCountryCallingCodeId": 1
}
Response¶
{
"message": {
"code": "28",
"type": {
"name": "SUCCESS"
},
"include_i_icon": false,
"description": "USER_CREDENTIALS_AUTHENTICATION_SUCCESS",
"parameters": [
{
"name": null,
"value": null
}
]
},
"locationPath": "home",
"userId": 1009,
"cardNotPresentChannelId": 135,
"cardPresentChannelId": null,
"forceChangePasswordInd": false,
"userLocale": {
"name": "en_US"
},
"passwordExpiryDaysIn": -1,
"securityQuestionsEnrolledInd": true,
"userEmail": "cuser.abctours@gmail.com",
"mobile": null,
"uiType": null,
"createdUserId": 1009,
"unpaidInvoiceCount": 0,
"acceptTermsOfUseAgreementInd": true,
"acceptPrivacyPolicyAgreementInd": true,
"roleType": {
"name": "CUSTOMER_USER"
},
"paymentAction": {
"name": "SALE"
},
"merchantId": null,
"customerId": null,
"invoiceNumber": null,
"sessionId": "C1257A01142E3301764D2819922F630B",
"totalActivePaymentMethods": 3,
"loyaltyStatus": {
"name": "NOT_ENROLLED"
},
"loyaltyRewardsNumber": null,
"totalOutstandingLoyaltyPoints": 7000,
"numberOfNotifications": 0
}
Negative Request & Response
If a negative request has been passed for example with incorrect password, then the Response would be as follows:
Request Body
{
"userName": "johnsmith",
"password": "Password12345",
"merchantCode: "VELA"
}
Response
{
"message": {
"code": "4",
"type": {
"name": "ERROR"
},
"include_i_icon": false,
"description": "LOGIN_CREDENTIALS_INVALID_ERROR",
"parameters": [
{
"name": null,
"value": null
}
]
},
"locationPath": null,
"userId": null,
"cardNotPresentChannelId": null,
"cardPresentChannelId": null,
"forceChangePasswordInd": false,
"userLocale": null,
"passwordExpiryDaysIn": null,
"securityQuestionsEnrolledInd": false,
"userEmail": null,
"mobile": null,
"uiType": null,
"createdUserId": null,
"unpaidInvoiceCount": null,
"acceptTermsOfUseAgreementInd": false,
"acceptPrivacyPolicyAgreementInd": false,
"roleType": null,
"paymentAction": null,
"merchantId": null,
"customerId": null,
"invoiceNumber": null,
"sessionId": "5BAE4DF010F1FA46F98DD529F821B7BD",
"totalActivePaymentMethods": null,
"loyaltyStatus": {
"name": "NOT_ENROLLED"
},
"loyaltyRewardsNumber": null,
"totalOutstandingLoyaltyPoints": null,
"numberOfNotifications": null
}
Updated As Of Version 7.2.x