PADEL LABDevelopers
v1.0.0-beta.1OpenAPIIm Club verwalten
GuidesAPI ReferenceSDKsOpenAPI JSONIm Club verwalten
Dokumentation öffnen
PUT/booking-sources/{sourceId}/court-mappings/{externalCourtId}

Create or replace an explicit court mapping

No heuristic court matching is performed. The selected court must belong to the token-bound club.

Bearer Tokenbookings:write

Request

curl · Sandboxbash
curl --request PUT \
  'https://sandbox-api.padel-lab.crewio.co/v1/club/booking-sources/src_01JABC/court-mappings/court-1' \
  --header 'Authorization: Bearer $PADEL_LAB_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "court_id": "crtabc123",
  "external_court_name": "Court 1"
}'

Parameter

sourceIdpathIdrequired
externalCourtIdpathstringrequired

Request Body

CourtMappingInputrequired
Examplejson
{
  "court_id": "crtabc123",
  "external_court_name": "Court 1"
}
JSON Schema anzeigen
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "court_id",
    "external_court_name"
  ],
  "properties": {
    "court_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Opaque stable identifier"
    },
    "external_court_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "x-runtime-normalization": "trim-before-length-validation"
    }
  }
}

Responses

200Court mapping savedCourtMappingResponse
201Court mapping createdCourtMappingResponse
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
404Resource is absent or outside the token-bound tenantErrorResponse
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

CourtMappingResponseStatus 200, 201
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "external_court_id",
        "external_court_name",
        "court_id",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Opaque stable identifier"
        },
        "external_court_id": {
          "type": "string"
        },
        "external_court_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "court_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Opaque stable identifier"
        },
        "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, 404, 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": {}
      }
    }
  }
}