Guest Book
Working with the restaurant's guest base: listing and search, creating and editing profiles, tags and visit history.
Working with the restaurant’s guest base: listing, search, creating and editing profiles, the guest card with visit history. Through these endpoints a partner app (CRM, POS, marketing service) can sync its customer base, enrich profiles with guest preferences and retrieve their visit history.
All endpoints require a Bearer token (see Authentication). General request conventions and the error format are covered in Conventions and Errors.
Base path: /api/loyalty/admin/restaurants/{restaurantId}/....
Historically the guest base is served under the
/api/loyalty/...prefix, and the entity in the API is calledmember. In this documentation it is simply a guest — with no tie to a loyalty program.
| Method | Path | Purpose |
|---|---|---|
GET | /members | List guests (OData filters) |
POST | /members | Create a guest |
GET | /members/{memberId} | Get a guest by ID |
PUT | /members/{memberId} | Update a guest |
DELETE | /members/{memberId} | Delete a guest |
GET | /members/find | Find by phone number |
GET | /members/email/{email} | Find by email |
GET | /members/search | Paged search (OData $filter) |
GET | /members/filter | Lightweight profile list |
POST | /members/export | Export the guest base |
GET | /members/{memberId}/visits | Visit history |
GET | /members/{memberId}/inprogress | Current (active) visits |
GET | /members/{memberId}/upcomingvisits | Upcoming visits |
GET | /customer/{memberId} | Guest card |
GET | /guest/{memberId}/details | Guest details |
Guest profile (CustomerContract)
Most read endpoints return a CustomerContract object — the full guest card.
The key fields are below. Read-only fields (aggregates, visit counters) are computed
by the system and ignored on create/update.
Identity and contacts
| Field | Type | Description |
|---|---|---|
id | string | Guest identifier |
fullName | string | Guest’s full name |
lastName | string | Last name |
phoneNumber | string | Phone |
officePhone | string | Work phone |
email | string | |
language | string | Preferred language |
gender | string | Gender |
companyName | string | Company |
officeAddress | string | Work address |
source | string | Where the guest came into the base from |
image | string | Avatar URL |
externalUserId | string | The guest’s external ID on your side |
Preferences and flags
| Field | Type | Description |
|---|---|---|
vip | boolean | VIP guest |
vegetarian | boolean | Vegetarian |
handicapAccessible | boolean | Needs accessible seating |
allergy | array<string> | List of allergies |
tablePreferences | string | Table/seating preferences |
aboutGuestNotes | string | Notes about the guest |
isBlacklisted | boolean | Blacklisted |
isMarketingOptOut | boolean | Opted out of marketing mailings |
guestTags | array<TagContract> | Guest tags: id, name, color |
Important dates
| Field | Type | Description |
|---|---|---|
birthdate | date-time | Date of birth |
birthDay / birthMonth | integer | Birth day / month (for reminders) |
anniversary | date-time | Anniversary |
anniversaryDay / anniversaryMonth | integer | Anniversary day / month |
joinDate | date-time | Date added to the base |
Guest statistics (read-only)
| Field | Type | Description |
|---|---|---|
status | string | Guest status |
numberOfVisitsTotal | integer | Total visits |
numberOfVisits30Days | integer | Visits in the last 30 days |
cancelCount | integer | Cancellations |
noShowCount | integer | No-shows |
averageCheque | number | Average check |
totalSpent | number | Total spent |
lastVisitDate | date-time | Last visit |
numberOfReservesTotal | integer | Total reservations |
numberOfReservesOnline | integer | Online reservations |
numberOfReservesHost | integer | Reservations made by the host |
upcomingVisits | integer | Upcoming visits |
Nested objects
| Field | Object | Contains |
|---|---|---|
deliveryAddressFull | Address | Delivery address: addressString, city, state, country, zip, street, building, apartment, coordinates (lat/lng), formattedAddress, timeZoneId |
linkedRestaurants | array<RestaurantSlim> | Linked restaurants of the chain: id, name, type, lastVisit, lastTotalSpent |
List guests
GET /members
Returns the restaurant’s guests with OData filtering, sorting and paging.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
$top | query | integer | How many records to return |
$skip | query | integer | How many records to skip |
$orderby | query | string | Sort field (OData) |
$filter | query | string | Filter condition (OData) |
fromDate | query | date-time | Period start (by visit/added date) |
toDate | query | date-time | Period end |
$eventIds | query | string | Filter by event identifiers |
Example
curl -G https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode '$top=50' \ --data-urlencode '$orderby=lastVisitDate desc'The exact schema of the successful (200) response is not captured in the spec. In practice the endpoint returns a collection of guests (
CustomerContract); for a paged variant with a total count useGET /members/search.
Create a guest
POST /members
Creates a new guest in the restaurant’s base. Body — CustomerUpdateContract.
Body fields
| Field | Type | Description |
|---|---|---|
fullName | string | Full name |
phoneNumber | string | Phone |
email | string | |
language | string | Preferred language |
gender | string | Gender |
aboutGuestNotes | string | Notes about the guest |
tablePreferences | string | Table preferences |
allergy | array<string> | Allergies |
anniversary | date-time | Anniversary |
birthdate | date-time | Date of birth |
companyName | string | Company |
officeAddress | string | Work address |
officePhone | string | Work phone |
vip | boolean | VIP guest |
vegetarian | boolean | Vegetarian |
handicapAccessible | boolean | Accessible seating |
isBlacklisted | boolean | Blacklisted |
isMarketingOptOut | boolean | Opted out of mailings |
guestTags | array<TagContract> | Tags: id, name, color |
base64DataUrl | string | Avatar as a data URL (base64) |
Example
curl -X POST https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "fullName": "John Parker", "phoneNumber": "+16175550123", "email": "ivan@example.com", "vip": true, "vegetarian": false, "allergy": ["nuts"], "tablePreferences": "Window table", "guestTags": [{ "name": "Regular", "color": "#DD7352" }] }'Response. On success —
201 Createdwith the created guest (CustomerContract). Documented errors: body —ProblemDetails(see Errors).
Get a guest
GET /members/{memberId}
Returns a guest by identifier.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
memberId * | path | string |
Update a guest
PUT /members/{memberId}
Updates the guest profile. Body — the same CustomerUpdateContract as on create;
send the fields you want to change.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
memberId * | path | integer |
curl -X PUT https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/456 \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "aboutGuestNotes": "Prefers a window table", "vip": true }'Delete a guest
DELETE /members/{memberId}
Removes the guest from the restaurant’s base.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | string |
memberId * | path | integer |
curl -X DELETE https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/456 \ -H "Authorization: Bearer $TOKEN"Find by phone
GET /members/find
Looks up a guest by phone number — handy before creating one, to avoid duplicates.
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
phoneNumber | query | string | Phone number to search for |
curl -G https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/find \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode "phoneNumber=+16175550123"Find by email
GET /members/email/{email}
Looks up a guest by email address.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | string |
email * | path | string |
curl https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/email/ivan@example.com \ -H "Authorization: Bearer $TOKEN"Paged search
GET /members/search
Paged guest search with an OData filter and a continuation token. Returns
a PagedResult with an array of full profiles and the total count.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
$filter | query | string | Filter condition (OData) |
take | query | integer | Page size |
skip | query | integer | Offset |
token | query | string | Continuation token for the next page |
Response (PagedResult<CustomerContract>)
| Field | Type | Description |
|---|---|---|
results | array<CustomerContract> | Matching guests (see the structure above) |
count | integer | Total number of matches |
curl -G https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/search \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode '$filter=contains(fullName,'"'"'John'"'"')' \ --data-urlencode 'take=25'Lightweight profile list
GET /members/filter
Returns simplified guest cards (CustomerProfileContract) — useful for lists and
autocomplete where the full statistics aren’t needed.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
take | query | integer | Page size |
token | query | string | Continuation token |
Response — array of CustomerProfileContract
| Field | Type | Description |
|---|---|---|
id | string | Guest identifier |
customerName | string | Name |
phone | string | Phone |
visitsCount | integer | Number of visits |
status | string | Status |
vendorName | string | Vendor |
lastVisitDate | date-time | Last visit |
isBlacklisted | boolean | Blacklisted |
guestTags | array<TagContract> | Tags: id, name, color |
Export the guest base
POST /members/export
Starts an export of the guest list (e.g. to a file/download). Body — ExportInfoCustomersContract.
| Field | Type | Description |
|---|---|---|
filter | string | Filter condition (OData) — which slice of the base to export |
curl -X POST https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/export \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "filter": "vip eq true" }'Response.
201 Created— the export has been accepted for processing.
Visit history
Three endpoints return a guest’s visits in different slices. All accept an optional
restaurantIds — to aggregate history across several restaurants of a chain.
Past visits
GET /members/{memberId}/visits
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
memberId * | path | integer | Guest identifier |
take | query | integer | Page size |
skip | query | integer | Offset |
orderBy | query | string | Sort field |
restaurantIds | query | array<integer> | Include visits to these restaurants |
Current visits
GET /members/{memberId}/inprogress
Visits happening right now (the guest is seated).
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
memberId * | path | integer | Guest identifier |
restaurantIds | query | array<integer> | List of restaurants |
Upcoming visits
GET /members/{memberId}/upcomingvisits
The guest’s future reservations.
| Parameter | In | Type | Description |
|---|---|---|---|
restaurantId * | path | integer | Restaurant identifier |
memberId * | path | string | Guest identifier |
restaurantIds | query | array<integer> | List of restaurants |
curl -G https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/members/456/visits \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode "take=20" \ --data-urlencode "orderBy=date desc"Guest card
Guest card
GET /customer/{memberId}
Returns the guest card by identifier.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
memberId * | path | string |
Guest details
GET /guest/{memberId}/details
Returns detailed information about the guest.
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
memberId * | path | string |
curl https://api.hostmeapp.com/api/loyalty/admin/restaurants/123/customer/ABC_ID \ -H "Authorization: Bearer $TOKEN"The exact response schemas for the guest card and guest details are not captured in the spec — in practice a guest profile with aggregated statistics is returned (close to
CustomerContract).