HolidazeVenues

Venues

Venues related to Holidaze

These endpoints allow you to retrieve venues.

These endpoints support pagination and sorting. Read more about these features here.

The Venue model

PropTypeDefault
id
string
-
name
string
-
description
string
-
media
Array<object>
-
price
float
-
maxGuests
integer
-
rating
float
-
created
string
-
updated
string
-
meta
Object
-
location
Object
-

Query parameters

Not all of the properties of a venue are returned by default. You can use the following optional query parameters to include additional properties in the response.

PropTypeDefault
_owner
boolean
false
_bookings
boolean
false
Example with all optional query parameters
{
  "data": {
    "id": "string",
    "name": "string",
    "description": "string",
    "media": [
      {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      }
    ],
    "price": 0,
    "maxGuests": 0,
    "rating": 0,
    "created": "string",
    "updated": "string",
    "meta": {
      "wifi": true,
      "parking": true,
      "breakfast": true,
      "pets": true
    },
    "location": {
      "address": "string",
      "city": "string",
      "zip": "string",
      "country": "string",
      "continent": "string",
      "lat": 0,
      "lng": 0
    },
    "owner": {
      "name": "string",
      "email": "user@example.com",
      "bio": "string",
      "avatar": {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      },
      "banner": {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      }
    },
    "bookings": [
      {
        "id": "string",
        "dateFrom": "string",
        "dateTo": "string",
        "guests": 0,
        "created": "string",
        "updated": "string",
        "customer": {
          "name": "string",
          "email": "user@example.com",
          "bio": "string",
          "avatar": {
            "url": "https://url.com/image.jpg",
            "alt": "string"
          },
          "banner": {
            "url": "https://url.com/image.jpg",
            "alt": "string"
          }
        }
      }
    ]
  },
  "meta": {}
}

All venues

GET/holidaze/venues

Retrieve all venues.

If you want to get all venues by a specific profile, you can use the venues by profile endpoint.

Response
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "media": [
        {
          "url": "https://url.com/image.jpg",
          "alt": "string"
        }
      ],
      "price": 0,
      "maxGuests": 0,
      "rating": 0,
      "created": "string",
      "updated": "string",
      "meta": {
        "wifi": true,
        "parking": true,
        "breakfast": true,
        "pets": true
      },
      "location": {
        "address": "string",
        "city": "string",
        "zip": "string",
        "country": "string",
        "continent": "string",
        "lat": 0,
        "lng": 0
      }
    },
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "media": [
        {
          "url": "https://url.com/image.jpg",
          "alt": "string"
        }
      ],
      "price": 0,
      "maxGuests": 0,
      "rating": 0,
      "created": "string",
      "updated": "string",
      "meta": {
        "wifi": true,
        "parking": true,
        "breakfast": true,
        "pets": true
      },
      "location": {
        "address": "string",
        "city": "string",
        "zip": "string",
        "country": "string",
        "continent": "string",
        "lat": 0,
        "lng": 0
      }
    }
    // ...
  ],
  "meta": {
    "isFirstPage": true,
    "isLastPage": true,
    "currentPage": 1,
    "previousPage": null,
    "nextPage": null,
    "pageCount": 1,
    "totalCount": 2
  }
}

Single venue

GET/holidaze/venues/<id>

Retrieve a single venue based on its id.

Response
{
  "data": {
    "id": "string",
    "name": "string",
    "description": "string",
    "media": [
      {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      }
    ],
    "price": 0,
    "maxGuests": 0,
    "rating": 0,
    "created": "string",
    "updated": "string",
    "meta": {
      "wifi": true,
      "parking": true,
      "breakfast": true,
      "pets": true
    },
    "location": {
      "address": "string",
      "city": "string",
      "zip": "string",
      "country": "string",
      "continent": "string",
      "lat": 0,
      "lng": 0
    }
  },
  "meta": {}
}

Create venue

POST/holidaze/venues

Creation a new venue.

Request
{
  "name": "string", // Required
  "description": "string", // Required
  "media": [
    {
      "url": "https://url.com/image.jpg",
      "alt": "string"
    }
  ], // Optional
  "price": 0, // Required
  "maxGuests": 0, // Required
  "rating": 0, // Optional (default: 0)
  "meta": {
    "wifi": true, // Optional (default: false)
    "parking": true, // Optional (default: false)
    "breakfast": true, // Optional (default: false)
    "pets": true // Optional (default: false)
  },
  "location": {
    "address": "string", // Optional (default: null)
    "city": "string", // Optional (default: null)
    "zip": "string", // Optional (default: null)
    "country": "string", // Optional (default: null)
    "continent": "string", // Optional (default: null)
    "lat": 0, // Optional (default: 0)
    "lng": 0 // Optional (default: 0)
  }
}
Response
{
  "data": {
    "id": "string",
    "name": "string",
    "description": "string",
    "media": [
      {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      }
    ],
    "price": 0,
    "maxGuests": 0,
    "rating": 0,
    "created": "string",
    "updated": "string",
    "meta": {
      "wifi": true,
      "parking": true,
      "breakfast": true,
      "pets": true
    },
    "location": {
      "address": "string",
      "city": "string",
      "zip": "string",
      "country": "string",
      "continent": "string",
      "lat": 0,
      "lng": 0
    }
  },
  "meta": {}
}

Update venue

PUT/holidaze/venues/<id>

Updating a venue.

Request
{
  "name": "string", // Optional
  "description": "string", // Optional
  "media": [
    {
      "url": "https://url.com/image.jpg",
      "alt": "string"
    }
  ], // Optional
  "price": 0, // Optional
  "maxGuests": 0, // Optional
  "rating": 0, // Optional
  "meta": {
    "wifi": true, // Optional
    "parking": true, // Optional
    "breakfast": true, // Optional
    "pets": true // Optional
  },
  "location": {
    "address": "string", // Optional
    "city": "string", // Optional
    "zip": "string", // Optional
    "country": "string", // Optional
    "continent": "string", // Optional
    "lat": 0, // Optional
    "lng": 0 // Optional
  }
}
Response
{
  "data": {
    "id": "string",
    "name": "string",
    "description": "string",
    "media": [
      {
        "url": "https://url.com/image.jpg",
        "alt": "string"
      }
    ],
    "price": 0,
    "maxGuests": 0,
    "rating": 0,
    "created": "string",
    "updated": "string",
    "meta": {
      "wifi": true,
      "parking": true,
      "breakfast": true,
      "pets": true
    },
    "location": {
      "address": "string",
      "city": "string",
      "zip": "string",
      "country": "string",
      "continent": "string",
      "lat": 0,
      "lng": 0
    }
  },
  "meta": {}
}

Delete venue

DELETE/holidaze/venues/<id>

Delete a venue based on its id.

Returns an empty 204 No Content response on success.


Search venues

GET/holidaze/venues/search?q=<query>

Search for venues by their name or description properties.