Login with phone number and passcode and get a token.
#### Request
```
{
"phone":"<+XX phone>",
"password":"<passcode>",
"channel":"APP"
}
```
#### Response
```
{
"tokenId":"<tokenuid>"
}
```
### POST /token (issue)
#### Description
Once a token is obtained through the login request, the signin request has to be confirmed on the app. This request is used for polling for that authorization and then getting actual credentials.
#### Request
```
{
"phone":"<+XX phone>",
"password":"<passcode>",
"tokenId":"<tokenuid>"
}
```
#### Response
##### Case 1 - Authorization Pending
```
{
"message": "One should obtain consent from the user before continuing",
"code": 9035
}
```
##### Case 2 - Authorization Granted
```
{
"tokenExpiryDate": <expirytimestamp>,
"refreshCode": "<refreshcode>",
"ownerId": "<ownerid>,
"accessToken": "<accesstoken>",
"user": {
"id": "<userid> (should be same as <ownerid>)",
"state": "ACTIVE"
}
}
```
### POST /token (refresh)
#### Description
The token has to be periodically refreshed.
#### Request
```
{
"userId":"<userid>"
"refreshCode":"<refreshcode>"
}
```
#### Response
```
{
"tokenExpiryDate": <expirydate>,
"refreshCode": "<refreshcode>",
"ownerId": "<ownerid>",
"accessToken": "<accesstoken>"
}
```
### GET /user/current/picture
#### Description
Get user profile picture.
#### Headers
```
{
"Authorization": <ownerid>:<accesstoken>
}
```
#### Response
Profile picture raw bytes.
### GET /user/current
#### Description
Get user details, including email, phone, full address, username, id, code.
#### Headers
```
{
"Authorization": <ownerid>:<accesstoken>
}
```
### Response
```
{
"user": {
"id": "<userid>",
"individualId": "<userid>",
"createdDate": <creationdate>,
"address": {
"city": "<city>",
"country": "<countrycode>",
"postcode": "<postcode>",
"region": "<region>",
"streetLine1": "<addressline1>",
"streetLine2": "<addressline2>"
},
"birthDate": [
<year>,
<month>,
<day>
],
"firstName": "<firstname>",
"lastName": "<lastname>",
"phone": "<+XX phone>",
"email": "<email>",
"emailVerified": true,
"state": "ACTIVE",
"referralCode": "<code>",
"code": "<code>",
"kyc": "PASSED",
"underReview": false,
"locale": "en-GB",
"riskAssessed": false,
"username": "<username>",
"identityDetails": {
"accountPurpose": "DAILY_SPENDING",
"taxResidencies": [],
"identificationNumbers": [
{
"country": "<countrycode>",
"name": "genericTin",
"value": "<?>"
}
]
},
"hasProfilePicture": true,
"appMode": "FULL"
},
"wallet": {
"baseCurrency": "EUR"
}
}
```
### GET /my-card/all
#### Description
Get an array of all the available cards in the account, without secret details. In a personal account, cards can be either virtual or physical. Virtual cards can also be tagged as single use (disposable). It is also known whether a card is for professional use (`PRO`) or for personal use (`RETAIL`).
#### Headers
```
{
"Authorization": <ownerid>:<accesstoken>
}
```
#### Response
```
[
{
"id": "<cardid>",
"walletId": "<walletid>",
"label": "<label>",
"state": "ACTIVE",
"virtual": true,
"disposable": false,
"credit": false,
"instalment": false,
"customised": false,
"brand": "MASTERCARD",
"design": "<designenum>",
"designGroup": "VIRTUAL",
"colour": "#<hexcolor>",
"lastUsedDate": <lastused>,
"lastFour": "<lastfourdigits>",
"expiryDate": <expirydate>,
"replaced": false,
"createdDate": <createddate>,
"productType": "PRO",
"settings": {
"locationSecurityEnabled": false,
"magstripeDisabled": true,
"atmWithdrawalsDisabled": true,
"ecommerceDisabled": false,
"contactlessDisabled": false,
"initial": false,
"pockets": [
{
"id": "<pocketid>",
"pocketType": "MERCHANT"
},
{
"id": "<pocketid>",
"pocketType": "MERCHANT"
}
]
},
"delivery": {
"status": "NONE"
},
"usage": <?>,
"preexpired": false,
"applePayEligible": true,
"googlePayEligible": true,
"cardClickActivationEligible": false,
"panActivationEligible": false
},
{
"id": "<cardid>",
"walletId": "<walletid>",
"label": "<label>",
"state": "ACTIVE",
"virtual": true,
"disposable": false,
"credit": false,
"instalment": false,
"customised": false,
"brand": "VISA",
"design": "<designenum>",
"designGroup": "VIRTUAL",
"colour": "#<hexcolor>",
"lastUsedDate": <lastused>,
"lastFour": <lastfourdigits>",
"expiryDate": "<expirydate>",
"replaced": false,
"createdDate": <createddate>,
"productType": "RETAIL",
"settings": {
"locationSecurityEnabled": false,
"magstripeDisabled": true,
"atmWithdrawalsDisabled": true,
"ecommerceDisabled": false,
"contactlessDisabled": false,
"initial": false,
"pockets": []
},
"delivery": {
"status": "NONE"
},
"usage": <?>,
"preexpired": false,
"applePayEligible": true,
"googlePayEligible": true,
"cardClickActivationEligible": false,
"panActivationEligible": false
}
]
```
### GET /my-card/<card uid>/details
#### Description
Get card secret details: pan, cvv, expiration date. The pan and the cvv are encrypted using AES ECB with the first 32 ascii chars of the token as key.