Guest

Create a guest

post/api/v1/restaurants/{restaurant_id}/guests

Request

  • Base URL: https://gotable.app
  • URL: https://gotable.app/api/v1/restaurants/{restaurant_id}/guests
  • Auth: HTTP bearer

Path parameters

restaurant_idinteger required

Request body

namestring required

Guest's name

emailstring nullable

Guest's email address

telephonestring nullable

Guest's telephone number

subscribedboolean nullable

Whether the guest may receive the newsletter

Example request

{
  "name": "John Doe",
  "email": "john.doe@example.com",
  "telephone": "+31612345678",
  "subscribed": true
}

Response

With a valid API token

idinteger

The unique ID of the guest

restaurant_idinteger

The unique ID of the restaurant

namestring nullable

Guest's name

emailstring nullable

Guest's email address

subscribedboolean

If the guest has subscribed to the newsletter

telephonestring nullable

Guest's telephone number

visitsinteger

Guest's number of visits

reservationsinteger

Guest's number of reservations

last_visitstring date nullable

The date of the guest's last visit

dietsstring[]

Guest's diets

allergiesstring[]

Guest's allergies

tagsstring[]

Guest's generic tags

Example response

{
  "id": 98765,
  "restaurant_id": 12345,
  "name": "John Doe",
  "email": "john.doe@example.com",
  "subscribed": true,
  "telephone": "+31612345678",
  "visits": 1,
  "reservations": 1,
  "diets": [
    "halal"
  ],
  "allergies": [
    "soja"
  ],
  "tags": [
    "vip"
  ],
  "links": [
    {
      "url": "https://gotable.app/api/v1/restaurants/12345/guests/98765",
      "rel": "self",
      "method": "GET"
    },
    {
      "url": "https://gotable.app/api/v1/restaurants/12345",
      "rel": "restaurant",
      "method": "GET"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.