On this page:
https://api.premepay.com/v1/users
Follow the route above to make a request and add a new user to use the API. You will need to send the request containing some mandatory fields. Below, you can view our List of Field Descriptions for Adding User.
<aside> <img src="/icons/light-bulb_red.svg" alt="/icons/light-bulb_red.svg" width="40px" /> Business type users have access to all the Stores associated with a Business, while Store type users have access only to the Store they are associated with.
</aside>
Parameter | Type | Description | Required |
---|---|---|---|
name |
string | Name | Yes |
username |
Yes | ||
password |
string | Password | Yes |
permission |
object | Permission | No |
entityId |
int | Identifier | Yes |
entityType |
string | Store or Business | Yes |
role |
int | Permission level | Yes |
Role is related to the user's access level and accepts the following integer values.
EntityId is the ID of the store or business where the user will have access.
Role | Permission level |
---|---|
0 |
Owner |
1 |
Administrator |
2 |
Agent |
3 |
ViewOnly |
4 |
API |
This is an example of how your request should look like for creating Business type users.
If your request is successful, you will receive the user object as the response.
If your request has invalid creation parameters - for example, specifying an invalid field or value - you may receive an error response. Below is the complete list of possible responses:
This is an example of how your request should look like for creating Store type users.
If your request is successful, you will receive the user object as the response.
200: OK
401: Unauthorized
403: Forbidden
Related Content
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bfe6a9ef-6d9a-405e-9fbe-484666d3fb5e/PUT.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bfe6a9ef-6d9a-405e-9fbe-484666d3fb5e/PUT.png" width="40px" /> PUT - Edit user
</aside>
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a22a31f7-bd92-40af-8042-7685c0c0859a/GET.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a22a31f7-bd92-40af-8042-7685c0c0859a/GET.png" width="40px" /> GET - Get user
</aside>