NAV Navbar
shell

Cover PMS Open API

HOW TO GET CREDENTIALS

  1. Create Dev Account at Settings -> Other -> Dev Accounts
  2. Setup proper set of permissions
  3. Endpoint url is also located at that page

1. General

Get Token

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/token" \
  --header "Content-Type: application/json" \
  --data "{\"key1\": 7f11cd8d74ba8033932dca7fe60ca133, \"key2\": 682a857cfe2b478a602f1741347ee319}"

200 - OK

{
  "success": true,
  "token": "l19WnM0qqaekAf0YnYApayjs-8A4H60f7i6GyqbrV1GE6uD2-JuWsPDbcEc9mb6zQ2xGVSZbAVazSOXD97sWwg"
}

403 - Forbidden

{
  "success": false,
  "reason": "Wrong password"
}

POST https://app.cover.is/api/public/v1/openapi/1/token

Retrieve token for communication. Token is valid for 1 hour.

Body

Get Extras

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/extras" \
  --header "x-api-token: {{token}}" \
  --data ""

200 - OK

{
  "extras": [
    {
      "id": 1,
      "title": "Champagne",
      "price": "10.0",
      "description": "Champagne on ice"
    },
    {
      "id": 3,
      "title": "Flowers",
      "price": "5.0",
      "description": null
    }
  ]
}

GET https://app.cover.is/api/public/v1/openapi/1/extras

Get all extras. Required permissions: booking_read

Headers

Get Bookings

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/bookings?created_at_gte=2018-04-30&checkout_date_lt=2018-06-06" \
  --header "x-api-token: {{token}}" \
  --data ""

200 OK

{
    "bookings": [
        {
            "token": "AAA-123111-A",
            "id": 123111,
            "checkin_date": "2018-05-03",
            "checkout_date": "2018-05-04",
            "rooms": [
                {
                    "checkin_date": "2018-05-03",
                    "checkout_date": "2018-05-04",
                    "room_number": "7",
                    "room_type": "Standard Double",
                    "status": "pending",
                    "occupation_status": "pending",
                    "guest_name": "John Doe",
                    "guest": {
                        "name": "John Doe"
                    },
                    "note": ""
                }
            ],
            "extras": [
                {
                    "id": 82793,
                    "title": "Champagne",
                    "sell_date": "2018-05-04",
                    "count": 2,
                    "price": "5.0",
                    "total": "10.0"
                },
                {
                    "id": 82607,
                    "title": "Breakfast",
                    "sell_date": "2018-05-04",
                    "count": 2,
                    "price": "0.0",
                    "total": "0.0"
                }
            ],
            "status": "pending",
            "created_at": "2018-05-01T18:35:58.302+07:00",
            "updated_at": "2018-05-04T17:50:46.609+07:00",
            "customer": {
                "name": "John Doe"
            },
            "total": "90.0",
            "due": "90.0",
            "paid": "0.0",
            "note": null
        },
        {
            "token": "AAA-412111-A",
            "id": 412111,
            "checkin_date": "2018-05-02",
            "checkout_date": "2018-05-03",
            "rooms": [
                {
                    "checkin_date": "2018-05-02",
                    "checkout_date": "2018-05-03",
                    "room_number": "6",
                    "room_type": "Standard Double",
                    "status": "pending",
                    "occupation_status": "checked-in",
                    "guets_name": "John Doe"
                    "guest": {
                        "name": "John Doe"
                    },
                    "note": ""
                }
            ],
            "extras": [
                {
                    "id": 82606,
                    "title": "Breakfast",
                    "sell_date": "2018-05-03",
                    "count": 2,
                    "price": "0.0",
                    "total": "0.0"
                }
            ],
            "status": "paid",
            "created_at": "2018-05-01T18:34:52.276+07:00",
            "updated_at": "2018-05-01T18:35:14.623+07:00",
            "customer": {
                "name": "John Doe"
            },
            "total": "100.0",
            "due": "0.0",
            "paid": "100.0",
            "note": null
        }
    ]
}

GET https://app.cover.is/api/public/v1/openapi/1/bookings?created_at_gte=2018-04-30&checkout_date_lt=2018-06-06

Get bookings by search criteria

Available fields to search:

Date format: YYYY-MM-DD

Available modifiers:

If the request is performed without params, the last 10 bookings will be returned

Required permissions:

Headers

Params

Add extras to booking

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/bookings/172950/add_extra" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{\"extra_id\": 1,
 \"price\": 5,
 \"count\": 2}"

200 OK

{
  "success": true,
  "booking": {
    "token": "AAA-123111-A",
    "id": 123111,
    "checkin_date": "2018-05-03",
    "checkout_date": "2018-05-04",
    "rooms": [
      {
        "checkin_date": "2018-05-03",
        "checkout_date": "2018-05-04",
        "room_number": "7",
        "room_type": "Standard Double",
        "status": "pending",
        "occupation_status": "pending"
      }
    ],
    "extras": [
      {
        "id": 82794,
        "title": "Champagne",
        "sell_date": "2018-05-04",
        "count": 2,
        "price": "5.0",
        "total": "10.0"
      },
      {
        "id": 82793,
        "title": "Champagne",
        "sell_date": "2018-05-04",
        "count": 2,
        "price": "5.0",
        "total": "10.0"
      },
      {
        "id": 82607,
        "title": "Breakfast",
        "sell_date": "2018-05-04",
        "count": 2,
        "price": "0.0",
        "total": "0.0"
      }
    ],
    "status": "pending",
    "created_at": "2018-05-01T18:35:58.302+07:00",
    "updated_at": "2018-05-04T19:02:53.666+07:00",
    "total": "100.0",
    "due": "100.0",
    "paid": "0.0"
  }
}

POST https://app.cover.is/api/public/v1/openapi/1/bookings/172950/add_extra

Required permissions:

Headers

Body

{ "extra_id": 1, "price": 5, "count": 2 }

Get rooms

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/rooms" \
  --header "x-api-token: {{token}}" \
  --data ""

200 OK

{
  "success": true,
  "rooms": [
    {
      "id": 1,
      "number": "1",
      "priority": 1,
      "room_type": {
        "id": 1,
        "name": "Standard Double",
        "default_price": 70
      },
      "property": {
        "id": 569,
        "name": "Demo Hotel"
      }
    }
  ]
}

GET https://app.cover.is/api/public/v1/openapi/1/rooms

Required permissions:

Headers

Get room

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/rooms/{{room_id}}" \
  --header "x-api-token: {{token}}" \
  --data ""

200 OK

{
  "success": true,
  "room": {
    "id": 3488,
    "number": "3",
    "priority": 1,
    "clean_status": "clean",
    "housekepeer_note": null,
    "do_not_disturb": false,
    "room_type": {
      "id": 531,
      "name": "Triple Room Shared Bathroom",
      "default_price": 100
    },
    "property": {
      "id": 634,
      "name": "Anchorage Guest House"
    }
  }
}

GET https://app.cover.is/api/public/v1/openapi/1/rooms/{{room_id}}

Required permissions:

Headers

Create payment request

Create payment request

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/payment_request" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"booking_id\": 111222,
    \"amount\": 10,
    \"provider\": \"payment_express\",
    \"send_email\": false
}"

200 - OK

{
  "link": "https://app.cover.is/api/public/v1/request_payment_page?token=i3Ic9XJdfeiNwrxjfgqi5Wkf_QeWnmfkEHzG_UkYnTo",
  "amount": 10,
  "send_email": true
}

Create payment request and send email

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/payment_request" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"booking_id\": 172950,
    \"amount\": 10,
    \"provider\": \"payment_express\",
    \"send_email\": true,
    \"send_to\": \"user@example.com\",
    \"subject\": \"Please make deposit for your booking at HotelName\",
    \"body\": \"We're sending link for partial deposit\"
}"

200 - OK

{
  "link": "https://app.cover.is/api/public/v1/request_payment_page?token=sliczizB2tvPhWtnomrOZxD4bO7xISiOjwZUSSAOBZ0",
  "amount": 10,
  "send_email": true
}

Wrong Amount

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/payment_request" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"booking_id\": 172950,
    \"amount\": 130,
    \"provider\": \"payment_express\",
    \"send_email\": false
}"

403 - Forbidden

{
  "success": false,
  "reason": "Amount should be lesser than due (80.0)"
}

Wrong booking ID

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/payment_request" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"booking_id\": 9999999,
    \"amount\": 10,
    \"provider\": \"payment_express\",
    \"send_email\": false
}"

403 - Forbidden

{
  "success": false,
  "reason": "No such booking"
}

Wrong provider

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/payment_request" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"booking_id\": 172950,
    \"amount\": 10,
    \"provider\": \"payment_expresaas\",
    \"send_email\": false
}"

403 - Forbidden

{
  "success": false,
  "reason": "No such provider"
}

POST https://app.cover.is/api/public/v1/openapi/1/payment_request

Create payment request for booking.

Required Params

Optional Params

Required permissions:

Headers

Body

{ "booking_id": 172950, "amount": 10, "provider": "payment_express", "send_email": true, "send_to": "user@example.com", "subject": "Please make deposit for your booking at HotelName", "body": "We're sending link for partial deposit" }

Checkin Room

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/bookings/172950/rooms/208330/checkin" \
  --header "x-api-token: {{token}}" \
  --data ""

200 OK

{
  "success": true
}

POST https://app.cover.is/api/public/v1/openapi/1/bookings/172950/rooms/208330/checkin

Required permissions:

Headers

Checkout Room

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/bookings/172950/rooms/208330/checkout" \
  --header "x-api-token: {{token}}" \
  --data ""

200 OK

{
  "success": true
}

POST https://app.cover.is/api/public/v1/openapi/1/bookings/172950/rooms/208330/checkout

Required permissions:

Headers

2. Housekeeper

Get rooms with filtering

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"key1\": \"kirill\", 
  \"key2\": \"kirill\"
}"

Filtering by zone_ids

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms?zone_ids=2" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"key1\": \"kirill\", 
  \"key2\": \"kirill\"
}"

Filtering by clean_status (inspected, dirty, clean, broken)

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms?clean_status=inspected" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"key1\": \"kirill\", 
  \"key2\": \"kirill\"
}"

Filtering by do_not_disturb

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms?do_not_disturb=true" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"key1\": \"kirill\", 
  \"key2\": \"kirill\"
}"

Filtering by occupied (true/false)

curl --location --request GET "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms?occupied=false" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"key1\": \"kirill\", 
  \"key2\": \"kirill\"
}"

200 - OK

{
  "rooms": [
    {
      "id": 1,
      "number": "1",
      "priority": 1,
      "clean_status": "broken",
      "housekepeer_note": "test",
      "do_not_disturb": false,
      "zone_id": 2,
      "zone_name": "New rooms",
      "room_type": {
        "id": 1,
        "name": "Standard",
        "default_price": 100
      },
      "property": {
        "id": 1,
        "name": "Test"
      }
    }
  ]
}

GET https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms

Filter rooms by:

  1. clean_status
  2. do_not_disturb
  3. zone_ids

Required permissions:

Headers

Change room clean status

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"clean_status\": \"dirty\"
  }
}"

200 OK

{
  "msg": "Room clean status was updated",
  "success": true
}

Trying to save with wrong clean_status

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"clean_status\": \"some_wrong_clean_status\"
  }
}"

403 Forbidden

{
  "success": false,
  "reason": "error"
}

Trying to change clean_status to broken without housekeeper_note

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"clean_status\": \"broken\"
  }
}"

403 Forbidden

{
  "success": false,
  "reason": "error"
}

Change room clean status with housekeeper_note

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"clean_status\": \"broken\",
    \"housekeeper_note\": \"Unable to turn on TV\"
  }
}"

200 OK

{
  "msg": "Room clean status was updated",
  "success": true
}

Trying to update to broken clean status without hk note

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"clean_status\": \"broken\"
  }
}"

403 Forbidden

{
  "success": false,
  "reason": "Invalid params: housekeeper_note field must be provided"
}

POST https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_room_clean_status

Change room clean status

Headers

Body

{ "room_clean_status": { "clean_status": "dirty" } }

Change do not disturb status

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_do_not_disturb_status" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
  \"room_clean_status\": {
    \"do_not_disturb\": true
  }
}"

200 OK

{
  "msg": "Room 'do not disturb' status updated",
  "success": true
}

POST https://app.cover.is/api/public/v1/openapi/1/housekeepers/rooms/{{room_id}}/change_do_not_disturb_status`

Change do_not_disturb status

Headers

Body

{ "room_clean_status": { "do_not_disturb": true } }

3. Inventory

Inventory Update

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/inventory" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"models\": [
        {
            \"room_rate\": \"qWvt\",
            \"date\": \"2018-07-21\",
            \"rate\": 100,
            \"closed_to_arrival\": true,
            \"stop_sell\": true
        }
    ]
}"

POST https://app.cover.is/api/public/v1/openapi/1/inventory

We accept JSON with array of models to update. Each model must have date, room_rate and short_code. We are allowed to change: rate, min_stay, min_stay_arrival, max_stay, closed_to_arrival, closed_to_departure, stop_sell.

Example: { models: [ { date: "2018-10-01", room_rate: "dbls", rate: 100.00, closed_to_arrival: true, closed_to_departure: false, stop_sell: false, min_stay: 2, min_stay_arrival: 1, max_stay: 30 } ] }

Headers

Body

{ "models": [ { "room_rate": "qWvt", "date": "2018-07-21", "rate": 100, "closed_to_arrival": true, "stop_sell": true } ] }

Inventory update (Allotz)

curl --location --request POST "https://app.cover.is/api/public/v1/openapi/1/inventory?allotz=true" \
  --header "x-api-token: {{token}}" \
  --header "Content-Type: application/json" \
  --data "{
    \"models\": [
        {
            \"room_code\": \"10\",
            \"rate_code\": \"4\",
            \"hotel_code\": \"2\",
            \"date\": \"2018-07-21\",
            \"rate\": 100,
            \"closed_to_arrival\": true,
            \"stop_sell\": true
        }
    ]
}"

POST https://app.cover.is/api/public/v1/openapi/1/inventory?allotz=true

Headers

Params

Body

{ "models": [ { "room_code": "10", "rate_code": "4", "hotel_code": "2", "date": "2018-07-21", "rate": 100, "closed_to_arrival": true, "stop_sell": true } ] }