RESOURCES > SITES
Bedful Sites
Sites represent a location containing bookable units, for example a campsite, a hotel, or a campervan hire location. Sites have many units, bookings and extras, and are the central resource on bedful to which all other resources are attached. They may be referred to as Property, Site or Location depending on the site kind.
Get Site
Use GET /sites/:id
to fetch information on one site.
curl https://devapi.bedful.com/sites/28 \
-u BEDFUL_KEY:
Parameters available
- id : specified in the url
- expand: set to true to see subsidiary records and other detail
This will return JSON like this for the matched record, or a 404 error if no record is found for the given id.
{
"id": 28,
"status": 100,
"created_at": "2015-09-16T10:57:09Z",
"updated_at": "2020-09-04T12:55:32Z",
"closed_until": "0001-01-01T00:00:00Z",
"name": "Filly Fields",
"url": "/campsites/uk/england/127-filly-fields",
"address": "Stoneleigh Park, Devon",
"telephone": "+441234345567",
"website": "http://example.com",
"email": "devs@bedful.com",
"summary": "",
"cc_summary": "",
"notes_prompt": "Please tell us what time you are due to arrive",
"latitude": 50.69563300000001,
"longitude": -3.18578100000002,
"logo_image_hash": "53f0c4733f8b17a28fdbf2b0a10a990dc3977011",
"rank": 100,
"kind": 13,
"available_days": 0,
"available_rank": 0,
"max_booking_people": 12,
"max_site_people": 0,
"hours_before_checkin": 0,
"exclusive_hire_threshold": 50,
"group_booking_days": 0,
"security_deposit_days": 7,
"booking_guarantee": 2,
"pay_up_front": 0,
"deposit": 30,
"vehicle_reg": 1,
"web_page_option": 1,
"google_analytics": "UA-12312344-1",
"geography": ["UK", "UK", "England", "England"]
}
Site Fields
- ID: The unique id of the site
- Status: The status of the site (0 is draft, 11 Suspended, 100 Live)
- CreatedAt: Creation date
- UpdatedAt: Last update date
- ClosedUntil: The date this site is closed until (introduced for Covid19 restrictions)
- Name: The name of the site
- URL: the canonical url of the site
- Address: The physical location of the site
- Telephone: The public telephone number
- Website: The public website (if any)
- Email: the public email of the site (if any)
- Summary: A text summary of the site
- CC_Summary: Deprecated, for internal use
- NotesPrompt: The prompt used for custom notes on the booking flow
- Latitude: The latitude of this site location
- Longitude: The longitude of this site location
- LogoImageHash: A hash for the asset of the site logo used in the booking flow header
- Rank: The rank of the site based on user reviews
- Kind: The kind of the site (Campsite, Glamping etc - based on tags)
- AvailableDays: The absolute number of available days in the future
- AvailableRank: A rank based on available days
- MaxBookingPeople: The maximum number of people per booking (0 if unset)
- MaxSitePeople: The maximum number of people onsite at once (0 if unset)
- HoursBeforeCheckin: The number of hours before checkin when bookings are not allowed
- ExclusiveHireThreshold: Internal use only
- GroupBookingDays: Internal use only
- SecurityDepositDays: Internal use only
- GoogleAnalytics: Internal use only
- Geography: A hierarchy of geographical tag names for this site
Get Sites
Use GET /sites
to fetch information on more than one site.
curl https://devapi.bedful.com/sites \
-u BEDFUL_KEY:
Parameters available
- site_id: restrict on site
- unit_id: restrict on units
- starts_at: the UTC start date for an avail search
- ends_at: the UTC end date for an avail search
- adults: Number of adults in an avail search
- children: Number of children in an avail search
- ages: Ages of all children in the search
- limit: limit the number of results returned, defaults to 500
This will return JSON like this for the matched records, or an empty list if no records are found.
{
"availability_search": false,
"total_count": "1",
"sites": [{
"id": 127,
"status": 100,
"updated_at": "2020-09-04T12:55:32Z",
"name": "Filly Fields",
"url": "/campsites/uk/england/127-filly-fields",
"address": "Stoneleigh Park, Devon",
"telephone": "+441234345567",
"website": "http://example.com",
"email": "devs@bedful.com",
"summary": "",
"cc_summary": "",
"notes_prompt": "Please tell us what time you are due to arrive",
"latitude": 50.69563300000001,
"longitude": -3.18578100000002,
"logo_image_hash": "53f0c4733f8b17a28fdbf2b0a10a990dc3977011",
"rank": 100,
"kind": 13,
"max_booking_people": 12,
"max_site_people": 0,
"hours_before_checkin": 0,
"exclusive_hire_threshold": 50,
"group_booking_days": 0,
"security_deposit_days": 7,
"booking_guarantee": 2,
"pay_up_front": 0,
"deposit": 30,
"vehicle_reg": 1,
"currency_id": 1,
"currency_rate": 1,
"geography": [],
"images": [
{
"id": 3793,
"hash": "2f36fffb284d810561e223d3c8e3e1018799f53f",
"name": "Demo"
}
],"availability": [
],
"from_price": 0
}],
"place": {
"id": 0,
"name": "",
"latitude": 0,
"longitude": 0
},
"timeout": false
}