PADEL LABDevelopers
v1.0.0-beta.1OpenAPIIm Club verwalten
GuidesAPI ReferenceSDKsOpenAPI JSONIm Club verwalten
Dokumentation öffnen
GET/bookings

List booking snapshots

Participant objects are returned only when the token also has participants:read and consent checks pass. Source-bound external ids are exposed only to the installation that owns that source. from includes rows with scheduled_start greater than or equal to the value; to includes rows with scheduled_start less than or equal to the value. When both are present, from must be less than or equal to to.

Bearer Tokenbookings:read
participants:readInclude consented, source-bound participant objects in the response; without it participants is an empty array.

Request

curl · Sandboxbash
curl --request GET \
  'https://sandbox-api.padel-lab.crewio.co/v1/club/bookings' \
  --header 'Authorization: Bearer $PADEL_LAB_TOKEN'

Parameter

limitqueryintegeroptional
cursorquerystringoptional

Opaque cursor returned by the previous page

location_idqueryIdoptional
court_idqueryIdoptional
statusqueryBookingStatusoptional
providerquerystringoptional
fromqueryTimestampoptional
toqueryTimestampoptional

Responses

200Booking pageBookingList
400Malformed JSON or a syntactically valid request that violates a path, query, header or JSON-body constraint.ErrorResponse
401Missing, invalid or expired tokenErrorResponse
403Installation lacks the required scope or is inactiveErrorResponse
429Rate limit exceededErrorResponse
500An unexpected runtime error occurred; retry only when the operation is safe or idempotent.ErrorResponse
503A required authorization, tenant-safety or rate-limit dependency is unavailableErrorResponse

Response Schemas

BookingListStatus 200
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "next_cursor",
        "has_more"
      ],
      "properties": {
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "has_more": {
          "type": "boolean"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "data"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "booking_source_id",
              "location_id",
              "court_id",
              "provider",
              "external_booking_id",
              "external_court_id",
              "source_version",
              "scheduled_start",
              "scheduled_end",
              "status",
              "participants",
              "match_session_id",
              "imported_at",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "Opaque stable identifier"
              },
              "booking_source_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "location_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "Opaque stable identifier"
              },
              "court_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "Opaque stable identifier"
              },
              "provider": {
                "type": "string"
              },
              "external_booking_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_court_id": {
                "type": "string"
              },
              "source_version": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scheduled_start": {
                "type": "string",
                "format": "date-time",
                "description": "UTC RFC 3339 timestamp"
              },
              "scheduled_end": {
                "type": "string",
                "format": "date-time",
                "description": "UTC RFC 3339 timestamp"
              },
              "status": {
                "type": "string",
                "enum": [
                  "CONFIRMED",
                  "CANCELLED",
                  "COMPLETED"
                ]
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "external_id",
                    "display_name"
                  ],
                  "description": "Data-minimized, explicitly consented participant. The response contains only source-bound external_id and display_name, and only when consent_to_share was true, the caller has participants:read and the participant belongs to the caller's source. Team, position, confirmation state, email, raw payloads, media, statistics and unrelated personal attributes are never included.",
                  "properties": {
                    "external_id": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    }
                  }
                }
              },
              "match_session_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "imported_at": {
                "type": "string",
                "format": "date-time",
                "description": "UTC RFC 3339 timestamp"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "UTC RFC 3339 timestamp"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "UTC RFC 3339 timestamp"
              }
            }
          }
        }
      }
    }
  ]
}
ErrorResponseStatus 400, 401, 403, 429, 500, 503
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "request_id"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Stable machine-readable code. Clients must tolerate unknown codes within the same HTTP class.",
          "examples": [
            "invalid_request",
            "invalid_cursor",
            "IDEMPOTENCY_KEY_REQUIRED",
            "unsafe_webhook_url",
            "authentication_required",
            "invalid_token",
            "insufficient_scope",
            "installation_inactive",
            "not_found",
            "VERSION_CONFLICT",
            "UNMAPPED_COURT",
            "IDEMPOTENCY_CONFLICT",
            "IDEMPOTENCY_IN_PROGRESS",
            "endpoint_limit_reached",
            "rate_limited",
            "internal_error",
            "idempotency_replay_failed",
            "authorization_unavailable",
            "rate_limit_unavailable"
          ]
        },
        "message": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        },
        "details": {}
      }
    }
  }
}