Description (Update User)
Update information of the selected user. (PUT)
End Point
https://api.yedpay.com/v1/users/{{user_id}}
Variable
# | Name | Type | Description |
---|---|---|---|
1 | user_id | String | User's ID |
Request Header
# | Key | Value | Description |
---|---|---|---|
1 | Authorization | Bearer {{access_token}} | Login Token |
2 | Content-Type | application/x-www-form-urlencoded | x-www-form-urlencoded Format |
Body
# | Name | Type | Description |
---|---|---|---|
1 | first_name | String | (Optional) User's First Name |
2 | last_name | String | (Optional) User's Last Name |
3 | String | User's Email | |
4 | phone | String | (Optional) User's phone number |
5 | country_code | String | (Required if phone is not empty) User's Country Code (e.g. +852) |
6 | username | String | (Optional) Account's username |
7 | password | String | (Optional) Account's password (at least 8 characters long, include a number, an uppercase letter and a lowercase letter) |
8 | operation_id | String | (Optional) Taxi Users' operation ID |
9 | driving_license | String | (Optional) Taxi users' driving license |
10 | can_refund | Boolean | (Optional) Authorization of Refund (true|1 or false|0) (Not For SuperOwner) |
Response
# | Name | Type | Description |
---|---|---|---|
1 | success | Boolean | Update User's Information Success or Fail |
2 | data | Array | Include all Targeted User's Information (id, company_id, email, etc..) |
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 | 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 | disabled | Boolean | Authorization if Disabled |
15 | last_login_time | String | Last Login DateTime of user "YYYY-mm-dd h:i:s" |
16 | created_at | String | DateTime of user was created "YYYY-mm-dd h:i:s" |
17 | 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", "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, "disabled": false, "last_login_time": "2018-08-13 13:10:29", "created_at": "2018-03-06 13:38:48", "updated_at": "2018-03-13 12:08:59" } }
Error Response
# | Name | Type | Description |
---|---|---|---|
1 | success | Boolean | False |
2 | message | String | Message of the Error |
3 | errors | Array | Error Information |
4 | status | Integer | HTTP Status Codes |
Error Response - errors
# | Name | Type | Description |
---|---|---|---|
1 | code | Integer | HTTP Status Codes |
2 | field | String | Field of Error |
3 | message | String | Message of the Error |
Example Error Response
{ "success": false, "message": "Could not create resource", "errors": [ { "code": 422, "field": "email", "message": "The email must be a valid email address." } ], "status": 422 }
v1.61.15-20230523 © The Payment Cards Group Limited. All rights reserved.