Guestfolio API Documentation

« back to overview

Guests [1.1]

The guest resources aggregate profile details for all of a guests interactions with a hotel. This includes all reservations for a single guest.

Guest profiles are gathered by PMS id when available or by email address on the reservation.

index

Get the list of guests for a hotel

URL

GET /api/hotels/:id/guests

Optional Parameters

  • page String

    Page number requested

  • per_page String

    Results to be shown per page

Response Object

  • Array of guest details

Examples

Request Response

{

"total_count": 3,
"total_pages": 3,
"guests": [
    {
        "id": 1,
        "profile_pms_key": "456789",
        "first_name": "First",
        "last_name": "Last",
        "street": "Street",
        "city": "City",
        "state": "State",
        "country": "Country",
        "language": "en",
        "created_at": "2012-12-13T10:20:50-08:00",
        "updated_at": "2012-12-15T12:18:26-08:00",
        "_links": {
            "self": {
                "href": "https://guestfolio.net/api/hotels/1/guests/1"
            },
            "reservations": [
                {
                    "href": "https://guestfolio.net/api/hotels/1/reservations/1",
                    "pms_key": "456789"
                },
                {
                    "href": "https://guestfolio.net/api/hotels/1/reservations/2",
                    "pms_key": "987654"
                }
            ]
        }
    }
"_links": {
    "self": {
        "href": "https://guestfolio.net/api/hotels/1/guests?page=2"
    }
    "previous": {
        "href": "https://guestfolio.net/api/hotels/1/guests?page=1"
    }
    "next": {
        "href": "https://guestfolio.net/api/hotels/1/guests?page=3"
    }
}

}

The guests array includes a hash of basic profile information and links to additional associated permitted API resources

show

Get a specific guests details

URL

GET /api/hotels/:id/guests/:id

Response Object

  • The guest details

Examples

Request Response

{

"id": 1,
"first_name": "First",
"last_name": "Last",
"street": "Street",
"city": "City",
"state": "State",
"country": "Country",
"language": "en",
"created_at": "2012-12-13T10:20:50-08:00",
"updated_at": "2012-12-15T12:18:26-08:00",
"unsubscription": {
    "reason": "The emails are spam and should be reported",
    "created_at": "2012-12-13T10:20:50-08:00",
},
"bounce": {
    "kind": "bounce",
    "status": "4.0.1",
    "reason": "Unknown",
    "created_at": "2012-12-13T10:20:50-08:00",
},
"_links": {
    "self": {
        "href": "https://guestfolio.net/api/hotels/1/guests/1"
    },
    "reservations": [
        {
            "href": "https://guestfolio.net/api/hotels/1/reservations/1",
                    "pms_key": "456789"
        },
        {
            "href": "https://guestfolio.net/api/hotels/1/reservations/2",
                    "pms_key": "987654"
        }
    ]
}

}

The guest hash includes full profile information and links to additional associated API methods