Businesses Reservations

Return all reservations for specific business.

Parameters
  • idpath integerRequired

    Return all reservations by the specific business id. You can retrieve this id from ...

  • includequery string

    Include associations (delimited with comma). Available associations: bookings, tables, business, user.

    Example: bookings,tables

  • sortquery string

    Sort ascending or descending order.

  • filter[start_date]query string

    Filter by start_date date should be formated as a ISO date.

  • filter[end_date]query string

    Filter by end_date date should be formated as a ISO date.

  • filter[from]query string

  • Filter by from.

  • filter[to]query string

  • Filter by to.

  • filter[statuses]query string

  • Filter by statuses.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/businesses/{id}/reservations

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/reservations`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}

RESPONSE

{
  "data": [
    {
      "id": "dc6e3cd0-cf3b-4d02-9969-3441c13dc51f",
      "type": "reservations",
      "links": {
        "self": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f"
      },
      "attributes": {
        "additional-info": null,
        "comment": null,
        "date": "2022-02-08",
        "email": "aleksandra.bochenska+client@netguru.com",
        "from": 50400,
        "name": "test",
        "other-rejection-reason": null,
        "party-size": 3,
        "phone": "222222222",
        "phone-country-code": "CH",
        "phone-country-prefix": "41",
        "reject-reason": "restaurant_full",
        "state": "rejected",
        "to": 53100,
        "created-at": "2022-02-07T11:22:39.958Z"
      },
      "relationships": {
        "bookings": {
          "links": {
            "self": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/relationships/bookings",
            "related": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/bookings"
          }
        },
        "tables": {
          "links": {
            "self": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/relationships/tables",
            "related": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/tables"
          }
        },
        "business": {
          "links": {
            "self": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/relationships/business",
            "related": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/business"
          }
        },
        "user": {
          "links": {
            "self": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/relationships/user",
            "related": "/reservations/dc6e3cd0-cf3b-4d02-9969-3441c13dc51f/user"
          }
        }
      }
    },
  ],
  "meta": {
    "total-count": 65,
    "total-pages": 7
  }
}