{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-resources/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Sparse Fieldsets","description":"Bookable is a TMS API gateway API — one integration to access real-time availability and manage bookings across venues on any table management system.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"sparse-fieldsets","__idx":0},"children":["Sparse Fieldsets"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, Bookable API responses return every field on the resource. Sparse fieldsets let you request only the fields you need, reducing payload size and improving response times — particularly useful for list endpoints where you may only need a few fields per record."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-it-works","__idx":1},"children":["How it works"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fields"]}," query parameter to any supported GET endpoint. The value is a comma-separated list of top-level field names. To select sub-fields of a nested object, use parentheses."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"fields=<field1>,<field2>,<field3(subfield1,subfield2)>\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fields"]}," is omitted, the full response is returned — fully backwards compatible."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-endpoints","__idx":2},"children":["Supported endpoints"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resource"},"children":["Resource"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /venues"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Venue"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /venues/{venueId}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Venue"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /venues/{compositeId}/availability"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AvailabilityResponse"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /venues/bookings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Booking"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /venues/bookings/{bookingId}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Booking"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"syntax","__idx":3},"children":["Syntax"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"select-top-level-fields","__idx":4},"children":["Select top-level fields"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"fields=id,name,location\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"select-sub-fields-of-a-nested-object","__idx":5},"children":["Select sub-fields of a nested object"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use parentheses to drill into a complex field:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"fields=id,name,location(lat,lng,city)\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"nest-multiple-levels-deep","__idx":6},"children":["Nest multiple levels deep"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nesting can go multiple levels:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"fields=id,name,products(compositeId,productName,availabilityRules(from,to))\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"multiple-nested-objects","__idx":7},"children":["Multiple nested objects"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Separate nested selections with commas inside parentheses:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"fields=id,name,location(lat,lng,city),products(compositeId,productName,category)\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"available-fields-by-resource","__idx":8},"children":["Available fields by resource"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"venue","__idx":9},"children":["Venue"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Valid top-level fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["venueGroupName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["content"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone_number"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["website"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reservable"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["location"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["types"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["photos"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["is_active"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["created_at"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updated_at"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["products"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preorders"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["opening_times"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"products-sub-fields","__idx":10},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["products"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compositeId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["productName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timeInterval"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preOrderRequired"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preOrderRequiredType"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["depositRequired"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["availabilityRules"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["category"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preorders"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spaces"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"productsspaces-sub-fields","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["products.spaces"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spaceName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["floorLocation"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["facilities"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityStanding"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacitySeated"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityCabaret"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityTheatre"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityBoardroom"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityClassroom"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityUShape"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityBanquet"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityReception"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["policies"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each capacity field supports sub-fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["min"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["max"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"productsspacespolicies-sub-fields","__idx":12},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["products.spaces.policies"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minimumSpend"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occasionTypes"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["under18s"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["promotedEvents"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accessibility"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["servesFood"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"availabilityresponse","__idx":13},"children":["AvailabilityResponse"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Valid top-level fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deposit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["policy"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancellationPolicy"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["times"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"times-sub-fields","__idx":14},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["times"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["duration"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["product"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"timesproduct-sub-fields","__idx":15},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["times.product"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spaces"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"timesproductspaces-sub-fields","__idx":16},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["times.product.spaces"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spaceName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["floorLocation"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["facilities"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityStanding"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacitySeated"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityCabaret"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityTheatre"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityBoardroom"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityClassroom"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityUShape"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityBanquet"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capacityReception"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["policies"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each capacity field supports sub-fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["min"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["max"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"timesproductspacespolicies-sub-fields","__idx":17},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["times.product.spaces.policies"]}," sub-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minimumSpend"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occasionTypes"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["under18s"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["promotedEvents"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accessibility"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["servesFood"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minimumSpend"]}," entries are pre-filtered to the requested date and time slot — use them directly without additional client-side filtering."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"booking","__idx":18},"children":["Booking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Valid top-level fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compositeId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partySize"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["venueGroupName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["location"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["duration"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["productName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notes"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdDate"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastUpdate"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preorders"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partnerBookingId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operatorBookingId"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":19},"children":["Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"fetch-venue-list--names-and-locations-only","__idx":20},"children":["Fetch venue list — names and locations only"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /venues?fields=id,name,location(lat,lng,city)\n"},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://api.bookabletech.com/venues?fields=id,name,location(lat,lng,city)\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const params = new URLSearchParams({\n  fields: 'id,name,location(lat,lng,city)',\n});\n\nconst response = await fetch(`${BASE_URL}/venues?${params}`, {\n  headers: { Authorization: `Bearer ${accessToken}` },\n});\n\nconst { data } = await response.json();\n// Each venue: { id, name, location: { lat, lng, city } }\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"response = requests.get(\n    f'{BASE_URL}/venues',\n    params={'fields': 'id,name,location(lat,lng,city)'},\n    headers={'Authorization': f'Bearer {access_token}'},\n)\nresponse.raise_for_status()\nvenues = response.json()['data']\n# Each venue: { 'id', 'name', 'location': { 'lat', 'lng', 'city' } }\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"HttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(BASE_URL + \"/venues?fields=id%2Cname%2Clocation(lat%2Clng%2Ccity)\"))\n    .header(\"Authorization\", \"Bearer \" + accessToken)\n    .GET()\n    .build();\n\nHttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var query = HttpUtility.ParseQueryString(string.Empty);\nquery[\"fields\"] = \"id,name,location(lat,lng,city)\";\n\nvar request = new HttpRequestMessage(HttpMethod.Get,\n    $\"{BASE_URL}/venues?{query}\");\nrequest.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", accessToken);\n\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\n","lang":"csharp"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": [\n    {\n      \"id\": \"29|X9|275cc44dd2e2496fba44857c9257443a\",\n      \"name\": \"The Grand Table\",\n      \"location\": {\n        \"lat\": 51.5074,\n        \"lng\": -0.1278,\n        \"city\": \"London\"\n      }\n    }\n  ],\n  \"page\": 1,\n  \"pageSize\": 20,\n  \"total\": 1\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-availability--times-only","__idx":21},"children":["Check availability — times only"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /venues/{compositeId}/availability?fields=times(time,duration,type)\n"},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"COMPOSITE_ID=\"29|CO|275cc44dd2e2496fba44857c9257443a|d99128c546b34b619c4477b712869f2b\"\n\ncurl \"https://api.bookabletech.com/venues/${COMPOSITE_ID}/availability?date=2025-08-15&partySize=4&fields=times(time,duration,type)\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const params = new URLSearchParams({\n  date: '2025-08-15',\n  partySize: 4,\n  fields: 'times(time,duration,type)',\n});\n\nconst response = await fetch(\n  `${BASE_URL}/venues/${compositeId}/availability?${params}`,\n  { headers: { Authorization: `Bearer ${accessToken}` } },\n);\n\nconst { times } = await response.json();\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"response = requests.get(\n    f'{BASE_URL}/venues/{composite_id}/availability',\n    params={\n        'date': '2025-08-15',\n        'partySize': 4,\n        'fields': 'times(time,duration,type)',\n    },\n    headers={'Authorization': f'Bearer {access_token}'},\n)\nresponse.raise_for_status()\ntimes = response.json()['times']\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"HttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(BASE_URL + \"/venues/\" + compositeId +\n        \"/availability?date=2025-08-15&partySize=4&fields=times(time%2Cduration%2Ctype)\"))\n    .header(\"Authorization\", \"Bearer \" + accessToken)\n    .GET()\n    .build();\n\nHttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var query = HttpUtility.ParseQueryString(string.Empty);\nquery[\"date\"] = \"2025-08-15\";\nquery[\"partySize\"] = \"4\";\nquery[\"fields\"] = \"times(time,duration,type)\";\n\nvar request = new HttpRequestMessage(HttpMethod.Get,\n    $\"{BASE_URL}/venues/{compositeId}/availability?{query}\");\nrequest.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", accessToken);\n\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\n","lang":"csharp"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-availability--times-with-space-details","__idx":22},"children":["Check availability — times with space details"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /venues/{compositeId}/availability?fields=times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))\n"},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"COMPOSITE_ID=\"29|CO|275cc44dd2e2496fba44857c9257443a|d99128c546b34b619c4477b712869f2b\"\n\ncurl \"https://api.bookabletech.com/venues/${COMPOSITE_ID}/availability?date=2025-08-15&partySize=4&fields=times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const params = new URLSearchParams({\n  date: '2025-08-15',\n  partySize: 4,\n  fields: 'times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))',\n});\n\nconst response = await fetch(\n  `${BASE_URL}/venues/${compositeId}/availability?${params}`,\n  { headers: { Authorization: `Bearer ${accessToken}` } },\n);\n\nconst { times } = await response.json();\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"response = requests.get(\n    f'{BASE_URL}/venues/{composite_id}/availability',\n    params={\n        'date': '2025-08-15',\n        'partySize': 4,\n        'fields': 'times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))',\n    },\n    headers={'Authorization': f'Bearer {access_token}'},\n)\nresponse.raise_for_status()\ntimes = response.json()['times']\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"String fields = \"times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))\";\n\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(BASE_URL + \"/venues/\" + compositeId +\n        \"/availability?date=2025-08-15&partySize=4&fields=\" + URLEncoder.encode(fields, StandardCharsets.UTF_8)))\n    .header(\"Authorization\", \"Bearer \" + accessToken)\n    .GET()\n    .build();\n\nHttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var query = HttpUtility.ParseQueryString(string.Empty);\nquery[\"date\"] = \"2025-08-15\";\nquery[\"partySize\"] = \"4\";\nquery[\"fields\"] = \"times(time,duration,type,product(id,name,spaces(id,spaceName,facilities,capacitySeated,policies(minimumSpend,occasionTypes))))\";\n\nvar request = new HttpRequestMessage(HttpMethod.Get,\n    $\"{BASE_URL}/venues/{compositeId}/availability?{query}\");\nrequest.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", accessToken);\n\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\n","lang":"csharp"},"children":[]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"fetch-bookings--status-dashboard","__idx":23},"children":["Fetch bookings — status dashboard"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only request what you need to power a booking list UI:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /venues/bookings?fields=id,compositeId,date,time,partySize,status,firstName,lastName\n"},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://api.bookabletech.com/venues/bookings?fields=id,compositeId,date,time,partySize,status,firstName,lastName\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const params = new URLSearchParams({\n  fields: 'id,compositeId,date,time,partySize,status,firstName,lastName',\n});\n\nconst response = await fetch(`${BASE_URL}/venues/bookings?${params}`, {\n  headers: { Authorization: `Bearer ${accessToken}` },\n});\n\nconst { data } = await response.json();\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"response = requests.get(\n    f'{BASE_URL}/venues/bookings',\n    params={'fields': 'id,compositeId,date,time,partySize,status,firstName,lastName'},\n    headers={'Authorization': f'Bearer {access_token}'},\n)\nresponse.raise_for_status()\nbookings = response.json()['data']\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"HttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(BASE_URL +\n        \"/venues/bookings?fields=id%2CcompositeId%2Cdate%2Ctime%2CpartySize%2Cstatus%2CfirstName%2ClastName\"))\n    .header(\"Authorization\", \"Bearer \" + accessToken)\n    .GET()\n    .build();\n\nHttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var query = HttpUtility.ParseQueryString(string.Empty);\nquery[\"fields\"] = \"id,compositeId,date,time,partySize,status,firstName,lastName\";\n\nvar request = new HttpRequestMessage(HttpMethod.Get,\n    $\"{BASE_URL}/venues/bookings?{query}\");\nrequest.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", accessToken);\n\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\n","lang":"csharp"},"children":[]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"combine-with-toon-for-llm-use-cases","__idx":24},"children":["Combine with TOON for LLM use cases"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sparse fieldsets reduce what data is returned. Pair them with ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/resources/toon-format"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept: text/toon"]}]}," to also strip JSON syntactic noise from the result. Together they can cut token consumption by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["60–75%"]}," compared to a default JSON response — directly reducing OpenAI and Claude API costs when feeding Bookings API data into an LLM."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /venues?fields=id,name,location(city),products(compositeId,productName)\nAccept: text/toon\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":25},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/resources/toon-format"},"children":["TOON Format"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/getting-started/booking-management"},"children":["Booking Management"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/resources/rate-limiting"},"children":["Rate Limiting"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/production/bookingapi"},"children":["Bookings API Reference"]}]}]}]},"headings":[{"value":"Sparse Fieldsets","id":"sparse-fieldsets","depth":1},{"value":"How it works","id":"how-it-works","depth":2},{"value":"Supported endpoints","id":"supported-endpoints","depth":2},{"value":"Syntax","id":"syntax","depth":2},{"value":"Select top-level fields","id":"select-top-level-fields","depth":3},{"value":"Select sub-fields of a nested object","id":"select-sub-fields-of-a-nested-object","depth":3},{"value":"Nest multiple levels deep","id":"nest-multiple-levels-deep","depth":3},{"value":"Multiple nested objects","id":"multiple-nested-objects","depth":3},{"value":"Available fields by resource","id":"available-fields-by-resource","depth":2},{"value":"Venue","id":"venue","depth":3},{"value":"products sub-fields","id":"products-sub-fields","depth":4},{"value":"products.spaces sub-fields","id":"productsspaces-sub-fields","depth":4},{"value":"products.spaces.policies sub-fields","id":"productsspacespolicies-sub-fields","depth":4},{"value":"AvailabilityResponse","id":"availabilityresponse","depth":3},{"value":"times sub-fields","id":"times-sub-fields","depth":4},{"value":"times.product sub-fields","id":"timesproduct-sub-fields","depth":4},{"value":"times.product.spaces sub-fields","id":"timesproductspaces-sub-fields","depth":4},{"value":"times.product.spaces.policies sub-fields","id":"timesproductspacespolicies-sub-fields","depth":4},{"value":"Booking","id":"booking","depth":3},{"value":"Examples","id":"examples","depth":2},{"value":"Fetch venue list — names and locations only","id":"fetch-venue-list--names-and-locations-only","depth":3},{"value":"Check availability — times only","id":"check-availability--times-only","depth":3},{"value":"Check availability — times with space details","id":"check-availability--times-with-space-details","depth":3},{"value":"Fetch bookings — status dashboard","id":"fetch-bookings--status-dashboard","depth":3},{"value":"Combine with TOON for LLM use cases","id":"combine-with-toon-for-llm-use-cases","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":"Sparse Fieldsets"}},"lastModified":"2026-04-01T15:20:49.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/resources/sparse-fieldsets","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}