Hotelrooms API (0.1.0)

Download OpenAPI specification:

Health Check

Health check endpoint.

Responses

Response samples

Content type
application/json
null

Login

Login endpoint. Authenticates a user and returns a Bearer token.

Request Body schema: application/x-www-form-urlencoded
required
Grant Type (string) or Grant Type (null) (Grant Type)
username
required
string (Username)
password
required
string <password> (Password)
scope
string (Scope)
Default: ""
Client Id (string) or Client Id (null) (Client Id)
Client Secret (string) or Client Secret (null) <password> (Client Secret)

Responses

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string"
}

Add User

Add a user to the database. For admins only.

Authorizations:
OAuth2PasswordBearer
query Parameters
username
required
string (Username)
password
required
string (Password)
permissions
string (Permissions)

Responses

Response samples

Content type
application/json
{
  • "message": "User successfully added."
}

Get Rooms Status

Get the status of rooms for a given property.

Authorizations:
OAuth2PasswordBearer
query Parameters
property_uuid
string (Property Uuid)
room_numbers
string (Room Numbers)

Responses

Response samples

Content type
application/json
{
  • "rooms_status": [
    ]
}

Get Properties

Get all properties that are enabled for the HospitalityAPI.

Returns the name and UUID for every property in MongoDB whose AHIP field is set to True. Properties missing the field, or with AHIP=False, are excluded.

Authorizations:
OAuth2PasswordBearer

Responses

Response samples

Content type
application/json
{
  • "properties": [
    ]
}