# Users

# Get User List

By using this API endpoint, it is possible to get the list of users.

Please note that you cannot get more than 100 records per request. In case you need to get more than 100 records, then you should make more than one request.

# Endpoint

GET /users

# Parameters

Name Type Description
name string Name of the user. Performs text-search.
email string Email of the user. Performs text-search.

# Response

TIP

HTTP/1.1 200 OK

{
  "data": [
    {
      "id": "QZOpo3GoB8X",
      "name": "John Doe",
      "email": "john@doe.com",
      "role": "support",
      "role_name": "Support",
      "tenant_name": "Company",
      "location_id": "ZOpo383vB8X",
      "location_name": "Venue",
      "status": 1,
    },
    ...
  ],
  "links": {
    "first": "https://api.iperawifi.com/api/v1/users?page=1",
    "last": null,
    "prev": null,
    "next": "https://api.iperawifi.com/api/v1/users?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "path": "https://api.iperawifi.com/api/v1/users",
    "per_page": 10,
    "to": 2,
  }
}

# Get User Count

By using this API endpoint, it is possible to get the count of the users.

# Endpoint

GET /users/count

# Parameters

Name Type Description
name string Name of the user. Performs text-search.
email string Email of the user. Performs text-search.

# Response

TIP

HTTP/1.1 200 OK

{
  "count": 1000
}

# Create User

Create a new user with given attributes.

# Endpoint

POST /users

# Parameters

Name Type Required Description
name string Name of the user. Min. 5 characters.
email string Email of the user.
role string Role of the user. tenant: Tenant Admin, venue: Venue Admin, front-desk: Front Desk
password string Password of the user. 8 - 30 characters in length and include a number, a symbol, an upper case letter, a lower case letter.
password_confirmation string Password confirmation. Must be same with password field.
status int Status of the user. 0: Passive, 1: Active, 2: Banned
location_id string Location of the user. Required if user's role is Venue Admin or Front Desk

# Response

TIP

HTTP/1.1 200 OK

{
  "data": {
    "id": "MO92vaXoe3a",
    "name": "John Doe",
    "email": "john@examplet.com",
    "role": "front-desk",
    "role_name": "Front Desk",
    "tenant_name": "Company",
    "location_id": "N1L5ead5j7p",
    "location_name": "Concert Venue",
    "status": "1",
    "api_token": null
  }
}

Unprocessable Entity

HTTP/1.1 422 Unprocessable Entity

{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "The name must be at least 5 characters."
    ],
    "email": [
      "The email field is required."
    ],
    "role": [
      "The role field is required."
    ],
    "password": [
      "The password field is required."
    ]
  }
}

# Update User

Update user information.

# Endpoint

PUT /users/:id

# Parameters

Name Type Required Description
name string Name of the user. Min. 5 characters.
email string Email of the user.
role string Role of the user. tenant: Tenant Admin, venue: Venue Admin, front-desk: Front Desk
status int Status of the user. 0: Passive, 1: Active, 2: Banned
password string Password of the user. 8 - 30 characters in length and include a number, a symbol, an upper case letter, a lower case letter.
password_confirmation string Password confirmation. Must be same with password field.
location_id string Location of the user. Required if user's role is Venue Admin or Front Desk

# Response

TIP

HTTP/1.1 200 OK

{
  "data": {
    "id": "MO92vaXoe3a",
    "name": "John Doe",
    "email": "john@examplet.com",
    "role": "front-desk",
    "role_name": "Front Desk",
    "tenant_name": "Company",
    "location_id": "N1L5ead5j7p",
    "location_name": "Concert Venue",
    "status": "1",
    "api_token": null
  }
}

Unprocessable Entity

HTTP/1.1 422 Unprocessable Entity

{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "The name must be at least 5 characters."
    ],
    "email": [
      "The email field is required."
    ],
    "role": [
      "The role field is required."
    ]
  }
}

# Deactivate User

Deactivate given user.

# Endpoint

PUT /users/:id/deactivate

# Parameters

None

# Response

TIP

HTTP/1.1 204 No Content

# Activate User

Activate given user.

# Endpoint

PUT /users/:id/activate

# Parameters

None

# Response

TIP

HTTP/1.1 204 No Content

Last Updated: 4/16/2025, 8:01:29 AM