Description (Me)
Get information related with the user. (GET)Can include the follow parameters separated by comma "," adding the parameter "include" in the url to get more information:
- * stores - provide all stores related with the user
- * company - provides the companies related with the user. (SuperOwner: show the first company only)
Example:
https://api-h2h-staging.yedpay.com/v1/me?include=company,stores
End Point
https://api-h2h-staging.yedpay.com/v1/me?include=company,stores
Request Header
| # | Key | Value | Description |
|---|---|---|---|
| 1 | Authorization |
Bearer {{ access_token }}
OR API-KEY {{ api_key }} |
Login Token
OR API Key |
Body
| # | Name | Type | Description |
|---|
Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | Request Success or Fail |
| 2 | data | Array | Include the follow parameters (Account's Information, Stores, Company, Balance, Daily_balance) |
Success Response - data
| # | Name | Type | Description |
|---|---|---|---|
| 1 | id | String | Id of the User |
| 2 | company_id | String | Id of the Company |
| 3 | role | String | Role of the User |
| 4 | String | Email of the User | |
| 5 | phone | String | Country code and Phone number of the User |
| 6 | username | String | Username of the User |
| 7 | first_name | String | First Name of the User |
| 8 | last_name | String | Last Name of the User |
| 9 | operation_id | String | Operation ID of User (For Taxi User ONLY) |
| 11 | driving_license | String | Driving license of User (For Taxi User ONLY) |
| 12 | can_refund | Boolean | Authorization of Refund |
| 13 | activated | Boolean | Boolean indicating whether the user has been activated yet |
| 14 | is_taxi_driver | Boolean | Specify if the user is a taxi driver |
| 15 | permission | Array | List user permission set |
| 16 | api_key_store_id | String | The Store ID of the API-KEY (API-KEY login only) |
| 17 | stores | Array | Array of Stores related with the user |
| 18 | disabled | Boolean | Authorization if Disabled |
| 19 | password_valid_till | Integer | Number of days till the user will be forced to update password |
| 20 | last_login_time | String | Last Login DateTime of user "YYYY-mm-dd h:i:s" |
| 21 | created_at | String | DateTime of user was created "YYYY-mm-dd h:i:s" |
| 22 | updated_at | String | Last modification DateTime of user "YYYY-mm-dd h:i:s" |
Example Success Response
Response for Normal User:
{
"success": true,
"data": {
"id": "JwoMPpKy",
"company_id": "JwoMPpKy",
"role": "owner",
"email": "xxx@xxx.com",
"phone": "+852-12345678",
"username": "xxxx",
"first_name": "xxxx",
"last_name": "xxxx",
"can_refund": true,
"activated": true,
"disabled": false,
"last_login_time": "2018-08-13 13:10:29",
"password_valid_till": 72,
"created_at": "2018-03-06 13:38:48",
"updated_at": "2018-03-08 14:09:58"
}
}
Response for Taxi User:
{
"success": true,
"data": {
"id": "JwoMPpKy",
"company_id": "JwoMPpKy",
"role": "owner",
"email": "",
"phone": "+852-12345678",
"username": "xxxx",
"first_name": "xxxx",
"last_name": "xxxx",
"operation_id": "xxxx",
"driving_license": "xxxxxx",
"can_refund": true,
"activated": true,
"disabled": false,
"last_login_time": "2018-08-13 13:10:29",
"password_valid_till": 179,
"created_at": "2018-03-06 13:38:48",
"updated_at": "2018-03-13 12:08:59"
}
}
Response for API-KEY login: (include=stores)
{
"success": true,
"data": {
"id": "1LP29DLY",
"company_id": "XL8KO468",
"role": "owner",
"email": "test@yedpay.com.hk",
"username": "TestCompany",
"phone": "",
"first_name": "Tester",
"last_name": "test 1",
"can_refund": true,
"activated": true,
"is_taxi_driver": false,
"disabled": false,
"last_login_time": "2025-02-04 10:47:03",
"created_at": "2024-06-13 10:52:17",
"password_valid_till": 95,
"updated_at": "2024-06-13 10:52:17",
"permission": [],
"api_key_store_id": "1LDZOJ6M",
"stores": [
{
"id": "1LDZOJ6M",
"company_id": "XL8KO468",
"company_name": "Store 1",
"name": "Store 1 Hong Kong",
"english_name": "Store 1 Hong Kong",
"email": "test@yedpay.com.hk",
"phone": "25220111",
"district_id": 1,
"address": "5 Connaught Road, Central",
"store_identifier": "1LDZOJ6M",
"open_office_hour": "00:00",
"close_office_hour": "00:59",
"type": 1,
"logo": "ELK2OYVR",
"logo_url": "",
"receipt_logo_url": "",
"created_at": "2024-06-13 10:52:17"
},
{
"id": "DL4D586M",
"company_id": "XL8KO468",
"company_name": "Store 2 Hong Kong",
"name": "Store 2",
"english_name": "",
"email": "test2@gmail.com",
"phone": "96789678",
"district_id": 13,
"address": "HK ",
"store_identifier": "DL4D586M",
"open_office_hour": "00:00",
"close_office_hour": "00:59",
"type": 1,
"logo": "GREMEXW6",
"logo_url": "",
"receipt_logo_url": "",
"created_at": "2024-06-13 11:00:16"
}
]
}
}
Error Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | False |
| 2 | message | String | Message of the Error |
| 3 | status | Integer | HTTP Status Code |
Example Error Response
{
"success": false,
"message": "Unauthenticated.",
"status": 500
}
//when user is forced to update password
{
"error_code": "password_expired",
"message": "Password Expired. Please change password before log into the system",
"action": {
"url": "/users/LWYK225R/password-update/N8g4PRVHiC77Kj3KIUW5ztwQunHRJ0YaIa2S0rg1av3r8Mgsj2yv8eG3WuK9PaLY"
}
}
v1.89.5-20251216 © The Payment Cards Group Limited. All rights reserved.