Description (Create Operator)
Create operator of company. (POST)
End Point
https://api.yedpay.com/v1/users
Variable
# | Name | Type | Description |
---|
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 | String | User's Email (Required without phone) | |
2 | phone | String | (Optional) User's phone number |
3 | first_name | String | (Optional) User's First Name |
4 | last_name | String | (Optional) User's Last Name |
5 | username | String | (Optional) Account's username |
6 | password | String | Account's password (at least 8 characters long, include a number, an uppercase letter and a lowercase letter) |
7 | store_id | String | Assign store to user |
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 |
11 | can_refund | Boolean | Authorization of Refund |
12 | disabled | Boolean | Authorization if Disabled |
13 | last_login_time | String | Last Login DateTime of user "YYYY-mm-dd h:i:s" |
14 | created_at | String | DateTime of user was created "YYYY-mm-dd h:i:s" |
15 | updated_at | String | Last modification DateTime of user "YYYY-mm-dd h:i:s" |
Example Success Response
{ "success": true, "data": { "id": "JwoMPpKy", "company_id": "JwoMPpKy", "role": "operator", "email": "xxx@xxx.com", "phone": "+852-12345678", "username": "", "first_name": "", "last_name": "", "can_refund": true, "disabled": "", "last_login_time": "", "created_at": "2018-03-06 13:38:48", "updated_at": "2018-03-08 14:09:58" } }
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.