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": 692,
"cardNotPresentChannelId": 115,
"cardPresentChannelId": null,
"userRoles": "CUSTOMER_USER",
"forceChangePasswordInd": false,
"userLocale": {
"name": "en_US"
},
"passwordExpiryDaysIn": -1,
"securityQuestionsEnrolledInd": true,
"userEmail": "cuser.velaatlanta@gmail.com",
"mobile": null,
"uiType": null,
"createdUserId": 642,
"unpaidInvoiceCount": 2,
"acceptTermsOfUseAgreementInd": true,
"acceptPrivacyPolicyAgreementInd": true,
"roleType": {
"name": "CUSTOMER_USER"
},
"paymentAction": {
"name": "SALE"
},
"merchantId": null,
"customerId": null,
"invoiceNumber": null,
"sessionId": "DC109A7C63BB35A99BB7F4DFACDCF98B",
"totalActivePaymentMethods": 0,
"loyaltyStatus": {
"name": "ENROLLED"
},
"loyaltyRewardsNumber": 10000000000003,
"totalOutstandingLoyaltyPoints": 7000
}
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,
"userRoles": 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": "DC109A7C63BB35A99BB7F4DFACDCF98B",
"totalActivePaymentMethods": null,
"loyaltyStatus": {
"name": "NOT_ENROLLED"
},
"loyaltyRewardsNumber": null,
"totalOutstandingLoyaltyPoints": null
}
Note
BASE_URL is derived from the merchant code.
For Test Environment, to obtain the BASE_URL, please contact vela@datumtg.com.
For Production Environment, to obtain the BASE_URL, please contact vela@datumtg.com.
Updated As Of Version 6.8.0.0