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

Resolve the token-bound installation and club

Bearer Tokenclub:read

Request

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

Responses

200Current contextContextResponse
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

ContextResponseStatus 200
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "installation",
        "application",
        "club"
      ],
      "properties": {
        "installation": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "application_id",
            "environment",
            "status",
            "scopes",
            "installed_at",
            "expires_at"
          ],
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Opaque stable identifier"
            },
            "application_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Opaque stable identifier"
            },
            "environment": {
              "type": "string",
              "enum": [
                "SANDBOX",
                "PRODUCTION"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "ACTIVE"
              ]
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "club:read",
                  "locations:read",
                  "courts:read",
                  "bookings:read",
                  "bookings:write",
                  "participants:read",
                  "participants:write",
                  "sessions:read",
                  "scores:read",
                  "events:read",
                  "webhooks:manage"
                ]
              },
              "uniqueItems": true
            },
            "installed_at": {
              "type": "string",
              "format": "date-time",
              "description": "UTC RFC 3339 timestamp"
            },
            "expires_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          }
        },
        "application": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "slug",
            "name"
          ],
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Opaque stable identifier"
            },
            "slug": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "club": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "slug",
            "name",
            "status",
            "timezone",
            "currency",
            "country",
            "language"
          ],
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Opaque stable identifier"
            },
            "slug": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "currency": {
              "type": "string"
            },
            "country": {
              "type": "string"
            },
            "language": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
ErrorResponseStatus 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": {}
      }
    }
  }
}