GraphQL API

BOOQR provides a GraphQL endpoint for flexible data querying. Fetch exactly the data you need in a single request.

Endpoint

GraphQL endpointhttp
POST /api/v1/graphql

Authentication

Use the same Authorization: Bearer header as the REST API. The API key must have the required scopes for the data you query.

Example Queries

Fetch Bookings with Object Details

Requestgraphql
query {
  bookings(status: CONFIRMED, first: 10) {
    id
    guestName
    guestEmail
    startTime
    endTime
    status
    totalPrice
    object {
      id
      name
      accommodation {
        name
        address
      }
    }
  }
}
Response 200json
{
  "data": {
    "bookings": [
      {
        "id": "uuid",
        "guestName": "Jan de Vries",
        "guestEmail": "jan@example.com",
        "startTime": "2026-02-17T10:00:00Z",
        "endTime": "2026-02-17T11:00:00Z",
        "status": "CONFIRMED",
        "totalPrice": 2500,
        "object": {
          "id": "uuid",
          "name": "Court 1",
          "accommodation": {
            "name": "Sports Center",
            "address": "Sportlaan 1"
          }
        }
      }
    ]
  }
}

Check Availability

Requestgraphql
query {
  availability(date: "2026-02-18", objectId: "uuid") {
    objectName
    slots {
      start
      end
      available
    }
  }
}
Response 200json
{
  "data": {
    "availability": {
      "objectName": "Court 1",
      "slots": [
        { "start": "07:00", "end": "08:00", "available": true },
        { "start": "08:00", "end": "09:00", "available": false }
      ]
    }
  }
}

Schema Introspection

Use standard GraphQL introspection to explore the full schema:

Introspection querygraphql
query {
  __schema {
    types {
      name
      fields {
        name
        type { name }
      }
    }
  }
}