{
  "openapi": "3.0.1",
  "info": {
    "title": "ManageMyMatch API",
    "description": "Public API to ManageMyMatch. With the exception of the \"anonymous\" class of calls, access requires user authorisation. For your personal **access token** and **api key**, refer to the [developer tab](https://app.managemymatch.com/my/account/developers)  in **My account** where you will find a panel entitled *Generate an accessToken for API access* \n\nIn the same tab, you may also declare an application (that will require MMM acceptance) that can authenticate any MMM user using our *oauth2* service.\n\nYou may try all API methods using our virtual server that return example responses only and requires no authentication or API keys.\n\n*Please note that this API is a work in progress and it is intended to grow over the coming months*\n\n[MMM application](https://app.managemymatch.com)\n\n[MMM public web site](https://www.managemymatch.com)",
    "contact": {
      "name": "MMM Support",
      "url": "https://managemymatch.zendesk.com",
      "email": "support@managemymatch.com"
    },
    "license": {
      "name": "License: Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "2.1.0"
  },
  "servers": [
    {
      "url": "https://api.managemymatch.com/{basePath}",
      "description": "ManageMyMatch server access",
      "variables": {
        "basePath": {
          "default": "v2",
          "enum": [
            "v2",
            "v1",
            "test",
            "dev"
          ]
        }
      }
    },
    {
      "url": "https://virtserver.swaggerhub.com/ManageMyMatch/Users/2.1.0",
      "description": "SwaggerHub API Auto Mocking"
    }
  ],
  "tags": [
    {
      "name": "anonymous",
      "description": "Anonymous access allowed"
    },
    {
      "name": "personal",
      "description": "Authenticated MMM user access only"
    },
    {
      "name": "oauth2",
      "description": "oauth2 bearer token access"
    },
    {
      "name": "coaching",
      "description": "Coaching sessions and signups. *Please note the following when retrieving a list of coaching sessions*:\n\nIf unauthenticated, the list contains all potentially available opportunities for coaching sessions that match the criteria of the query parameters. Private group sessions, however, are hidden.\n\nWith authentication the list will only present sessions to which at least one of the authenticated user or their family members, have access which means:\n1. Groups leaders, group deputies and event organisers will see all available (and booked) sessions\n2. Otherwise, the user must either be a member of the group or be eligible to join the group\n\nOnly sessions that involve a client fee are shown and group sessions must be booked.\n\nFor individual sessions, all booking slots that fall within the leaders' availability periods (as per their preferences) will be shown.\n\nOnly available court slots will show and only those that match the expected duration as set for each fee option. For individual sessions, only courts that are \"preferred\" by the coach in their preferences are available.\n\nThe results returned are sorted in date/time order - earliest to latest"
    }
  ],
  "paths": {
    "/affiliates": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieve all affiliate details",
        "description": "Results are paged and may need multiple calls to collect the full set",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of affiliate details in name order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Affiliate"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-request-validator": "all",
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/affiliates/{id}": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieve a specific affiliate's details",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Affiliate details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Affiliate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/clubs": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieve all club details",
        "description": "Results are paged and may need multiple calls to collect the full set",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of club details in name order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Club"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/clubdistances": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieve distance from given address to all clubs",
        "description": "Results are paged and may need multiple calls to collect the full set",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "address",
            "in": "query",
            "description": "A UK address or postcode",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "example": "AB12 3CD"
          }
        ],
        "responses": {
          "200": {
            "description": "An array of clubs in distance order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "$ref": "#/components/schemas/Id"
                      },
                      "name": {
                        "type": "string",
                        "description": "Club name",
                        "example": "Acme squash"
                      },
                      "distance": {
                        "type": "number",
                        "description": "Distance in miles from the club to the address given",
                        "example": 3.6
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/clubs/{id}": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieve a specific club's details",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Club details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Club"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/clubs/{id}/events": {
      "get": {
        "tags": [
          "anonymous"
        ],
        "summary": "Retrieves events currently hosted by this club",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Club events presented in a nested structure in order to group in the following hierarchy [hosting affiliate, event group, event type, event instance, bookings]",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "clubActivities"
                  ],
                  "type": "object",
                  "properties": {
                    "clubActivities": {
                      "type": "array",
                      "description": "A set of affiliates that own the events listed within",
                      "items": {
                        "required": [
                          "groups",
                          "id",
                          "name",
                          "type"
                        ],
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/components/schemas/Id"
                          },
                          "name": {
                            "type": "string",
                            "description": "Affiliate name",
                            "example": "Bucks squash"
                          },
                          "type": {
                            "$ref": "#/components/schemas/AffiliateType"
                          },
                          "longName": {
                            "type": "string",
                            "description": "Longer name for the affiliate",
                            "example": "Buckinghamshire County Squash Association"
                          },
                          "description": {
                            "type": "string",
                            "description": "Description of the affiliate",
                            "example": "Brief club description"
                          },
                          "groups": {
                            "type": "array",
                            "description": "Groups of events in group name order. Note that the period covers the time from the earliest event start to the latest event end",
                            "items": {
                              "required": [
                                "id",
                                "name",
                                "series"
                              ],
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/Id"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Group name",
                                  "example": "Club championships"
                                },
                                "description": {
                                  "type": "string",
                                  "description": "Group description",
                                  "example": "Various draws for all members to compete in an annual championship event"
                                },
                                "series": {
                                  "type": "array",
                                  "description": "Events categorised within the group",
                                  "items": {
                                    "required": [
                                      "eligibility",
                                      "id",
                                      "name",
                                      "sport"
                                    ],
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "$ref": "#/components/schemas/Id"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Event name",
                                        "example": "Squash Ladies tournament"
                                      },
                                      "description": {
                                        "type": "string",
                                        "description": "Event description",
                                        "example": "Plate and main draws for ladies of all ages"
                                      },
                                      "frequency": {
                                        "type": "string",
                                        "description": "How often this event is held",
                                        "example": "Annually"
                                      },
                                      "schedule": {
                                        "type": "string",
                                        "description": "Indication of when this event is held",
                                        "example": "Spring"
                                      },
                                      "sport": {
                                        "$ref": "#/components/schemas/Sport"
                                      },
                                      "eligibility": {
                                        "type": "object",
                                        "properties": {
                                          "members": {
                                            "type": "boolean",
                                            "description": "True if this event is open to members"
                                          },
                                          "nonMembers": {
                                            "type": "boolean",
                                            "description": "True if this event is open to non-members"
                                          },
                                          "male": {
                                            "$ref": "#/components/schemas/AgeEligibility"
                                          },
                                          "female": {
                                            "$ref": "#/components/schemas/AgeEligibility"
                                          }
                                        },
                                        "description": "Eligibility details"
                                      },
                                      "period": {
                                        "$ref": "#/components/schemas/DatePeriod"
                                      },
                                      "events": {
                                        "type": "array",
                                        "description": "Individual draws of specifically dated events",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "$ref": "#/components/schemas/Id"
                                            },
                                            "name": {
                                              "type": "string",
                                              "description": "Event name",
                                              "example": "A draw"
                                            },
                                            "stage": {
                                              "type": "string",
                                              "description": "The stage that this draw is in",
                                              "enum": [
                                                "pending",
                                                "open",
                                                "closed",
                                                "inplay",
                                                "completed",
                                                "archived"
                                              ]
                                            },
                                            "ticketed": {
                                              "type": "boolean",
                                              "description": "True if this event is a ticketed spectator event"
                                            },
                                            "personal": {
                                              "type": "boolean",
                                              "description": "True if this event involves individually booked matches"
                                            },
                                            "period": {
                                              "$ref": "#/components/schemas/DatePeriod"
                                            },
                                            "bookings": {
                                              "type": "array",
                                              "description": "If personal is False, then this lists the dates and times of bookings or sessions over the coming month. If no period is given, it's simply general indication of bookings that could be made",
                                              "items": {
                                                "required": [
                                                  "id",
                                                  "name",
                                                  "type"
                                                ],
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "$ref": "#/components/schemas/Id"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "description": "The type of booking. \\\"tournament\\\" general booking in the name of the event, \\\"team\\\" general booking in the name of a team, \\\"fixture\\\" a specific team fixture or group session booking to which participants could be booked into",
                                                    "enum": [
                                                      "tournament",
                                                      "team",
                                                      "fixture"
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The purpose of the booking",
                                                    "example": "Cardio coaching session"
                                                  },
                                                  "period": {
                                                    "$ref": "#/components/schemas/DatePeriod"
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "period": {
                                  "$ref": "#/components/schemas/DatePeriod"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/details": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Retrieve user details",
        "description": "Details include personal information like DoB etc",
        "parameters": [
          {
            "name": "includeCredit",
            "in": "query",
            "description": "True if we want to retrieve the member's club balance(s). This can be costly in terms of response time. If False, `clubs.credit` is set to 0",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includePayment",
            "in": "query",
            "description": "True if we want to retrieve the member's payment record. This can be costly in terms of response time. If False, `hasPaymentMethod` is always to false",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/bookings": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Retrieve all outstanding personal bookings",
        "description": "Bookings for personal matches, private coaching, invitations or guest play only. Group, team or club play sessions that you may be involved in are not included",
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BookingItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/matches": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Retrieves all individual matches already played or setup to be played",
        "description": "All individual or team matches that the user has participated in. Use the query parameters to filter what kind of matches are returned. Matches are ordered by reverse date of last change (not necessarily in the order of their play)",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "eventId",
            "in": "query",
            "description": "Filter by a single event",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "matchType",
            "in": "query",
            "description": "Filter by the type of match - you can comma separate any of the options to select matches that belong to any of the types listed",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/MatchType"
            }
          },
          {
            "name": "matchStatus",
            "in": "query",
            "description": "Filter by the status of the match",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/MatchStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Match"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/clubs": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "List my clubs that provide coaching",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/affiliates": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "List organisations to which I am associated that provide coaching",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/sessions/club/{id}": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "Retrieve all available coaching sessions held at the club as identified to which I do or could attend",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "involvement",
            "in": "query",
            "description": "Filter by the users involvement",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "description": "Involvement level - Either as a coach representative or a user who is already a member of the coaching groups",
              "enum": [
                "ascoach",
                "asmember"
              ]
            }
          },
          {
            "name": "coach",
            "in": "query",
            "description": "Filter by a particular coach",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/sessions/affiliate/{id}": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "Retrieve all available coaching sessions administered by the organisation as identified to which I do or could attend",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "involvement",
            "in": "query",
            "description": "Filter by the users involvement",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "description": "Involvement level - Either as a coach representative or a user who is already a member of the coaching groups",
              "enum": [
                "ascoach",
                "asmember"
              ]
            }
          },
          {
            "name": "coach",
            "in": "query",
            "description": "Filter by a particular coach",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/sessions/owner/{id}": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "Retrieve all available coaching sessions administered by the owner identified to which I do or could attend",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/sessions/coach/{id}": {
      "get": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "Retrieve all available coaching sessions taken by a particular coach to which I do or could attend",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/my/coaching/session": {
      "post": {
        "tags": [
          "coaching",
          "personal"
        ],
        "summary": "Acts on the body content to sign in or out of a coaching session",
        "description": "The action to take is inferred from the state of the session with respect to the client.\nFor example, if the client is already participating the action will remove the client from participation.\nIf the user is not participating then the action will be to sign the client up for participation.\nThe return value will be a version of the `session` object with relevant state updated in terms of `participation` and `attendance`.\nThis can be used to update the UI as appropriate, without having to requery all the sessions.\n\nIf this technique to use the returned object to update the UI is used, then it should be noted that it may leave *other* session objects slightly out-dated - for example leaving the apparent ability to book another session at the same time. If an attempt were made, via the `\\coaching\\session` end point, to book such a slot it will fail (gracefully with an error message)",
        "requestBody": {
          "description": "Identifies the client signing in or out against the relevant session. The `clientId` must be the `id` of one of those listed in the `clients` array within the `session` object.\n\nThe body is exactly the same object as those retrieved from the `coaching\\sessions` end point and is therefore intended to be used having received one of these. Otherwise this post would be somewhat complex to construct",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientId": {
                    "$ref": "#/components/schemas/Id"
                  },
                  "session": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          },
          "401": {
            "$ref": "#/components/responses/badUser"
          }
        },
        "security": [
          {
            "api_key": [],
            "access_token_v3": []
          }
        ],
        "x-amazon-apigateway-request-validator": "Validate body",
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/clubs": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all clubs that provide coaching",
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "affiliateId",
            "in": "query",
            "description": "Filter by a single affiliate",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/affiliates": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all independent organisations that provide coaching",
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/coaches": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all coaches in the MMM network",
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "clubId",
            "in": "query",
            "description": "Filter by a single club",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "affiliateId",
            "in": "query",
            "description": "Filter by a single affiliate",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/sports": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all sports for which coaching is available",
        "parameters": [
          {
            "name": "clubId",
            "in": "query",
            "description": "Filter by a single club",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "affiliateId",
            "in": "query",
            "description": "Filter by a single affiliate",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Sport"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/sessions/club/{id}": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all available coaching sessions held at the club as identified",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "involvement",
            "in": "query",
            "description": "Filter by the users involvement",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "description": "Involvement level - Either as a coach representative or a user who is already a member of the coaching groups",
              "enum": [
                "ascoach",
                "asmember"
              ]
            }
          },
          {
            "name": "coach",
            "in": "query",
            "description": "Filter by a particular coach",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/sessions/affiliate/{id}": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all available coaching sessions administered by the organisation as identified",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "involvement",
            "in": "query",
            "description": "Filter by the users involvement",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "description": "Involvement level - Either as a coach representative or a user who is already a member of the coaching groups",
              "enum": [
                "ascoach",
                "asmember"
              ]
            }
          },
          {
            "name": "coach",
            "in": "query",
            "description": "Filter by a particular coach",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/sessions/owner/{id}": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all available coaching sessions administered by the coaching event organiser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/coaching/sessions/coach/{id}": {
      "get": {
        "tags": [
          "coaching"
        ],
        "summary": "Retrieve all available coaching sessions taken by a particular coach",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Standard MMM document identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "$ref": "#/components/schemas/EmptyId"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by type of session (individual or group)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "group"
              ]
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "The period in days in which to return results",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 30,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The number of items to skip before starting to collect the result set.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of items to return.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badParams"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-amazon-apigateway-integration": {
          "uri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:newApi:${stageVariables.alias}/invocations",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "passthroughBehavior": "when_no_match",
          "httpMethod": "POST",
          "contentHandling": "CONVERT_TO_TEXT",
          "type": "aws_proxy"
        }
      }
    },
    "/oauth/user": {
      "get": {
        "tags": [
          "oauth2"
        ],
        "description": "Retrieves basic user identification",
        "responses": {
          "200": {
            "description": "Authenticated user details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Id"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the user",
                      "example": "Joe Bloggs"
                    },
                    "systemAdministrator": {
                      "type": "boolean",
                      "description": "True if the user is an MMM system administrator",
                      "example": true
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          }
        ]
      },
      "servers": [
        {
          "url": "https://{subDomain}.managemymatch.com",
          "description": "Access point to retrieve basic user information with a bearer token",
          "variables": {
            "subDomain": {
              "default": "app",
              "enum": [
                "app",
                "test",
                "dev",
                "staging"
              ]
            }
          }
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Invalid query parameters"
          }
        }
      },
      "Affiliate": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string",
            "description": "Affiliate name",
            "example": "Bucks squash"
          },
          "longName": {
            "type": "string",
            "description": "Longer name for the affiliate",
            "example": "Buckinghamshire County Squash Association"
          },
          "clubs": {
            "type": "array",
            "description": "clubs associated with this affiliate",
            "items": {
              "$ref": "#/components/schemas/ObjectIdentifier"
            }
          },
          "administrators": {
            "type": "array",
            "description": "Administrators of this affiliate (specifically can create new events)",
            "items": {
              "$ref": "#/components/schemas/ObjectIdentifier"
            }
          },
          "type": {
            "$ref": "#/components/schemas/AffiliateType"
          },
          "juniorConsentRequirement": {
            "type": "boolean",
            "description": "True if consent management is required for junior (U18) event participation"
          }
        }
      },
      "Club": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string",
            "description": "Club name",
            "example": "Holmer Green SRC"
          },
          "shortName": {
            "type": "string",
            "description": "Shorter (mnemonic) name for the club",
            "example": "HGSRC"
          },
          "address": {
            "type": "string",
            "description": "Address of the club",
            "example": "1 club row, Sunny vale, Bucks"
          },
          "postcode": {
            "type": "string",
            "description": "Postcode of the club",
            "example": "AB12 3CD"
          },
          "website": {
            "type": "string",
            "description": "Full web address of club's web site",
            "example": "https://www.clubsite.com"
          },
          "email": {
            "type": "string",
            "description": "Club's contact email address",
            "format": "email",
            "example": "club@somewhere.com"
          },
          "location": {
            "type": "object",
            "properties": {
              "latitude": {
                "type": "number",
                "description": "Latitude of the club",
                "example": 51.7970328766698
              },
              "longitude": {
                "type": "number",
                "description": "Longitude of the club",
                "example": -0.6416050833976694
              }
            },
            "description": "Provide the precise location of the club (usually the club house)"
          },
          "affiliates": {
            "type": "array",
            "description": "Club affiliations",
            "items": {
              "$ref": "#/components/schemas/ObjectIdentifier"
            }
          },
          "officials": {
            "type": "array",
            "description": "Club officials and their roles",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Id"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the club Official",
                  "example": "Joe Bloggs"
                },
                "role": {
                  "type": "string",
                  "description": "The role the club official plays for the club",
                  "example": "Treasurer"
                },
                "email": {
                  "type": "string",
                  "description": "Club official's email address",
                  "format": "email",
                  "example": "joebloggs@somehwere.com"
                }
              }
            }
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string",
            "description": "First and last name",
            "example": "Joseph Bloggs"
          },
          "address": {
            "type": "string",
            "description": "Full address",
            "example": "12 Sycamore avenue, etc"
          },
          "postcode": {
            "type": "string",
            "description": "Post code or Zip code",
            "example": "FE11 6GT"
          },
          "phone": {
            "type": "string",
            "description": "Users phone number",
            "example": "09876 123456"
          },
          "email": {
            "type": "string",
            "description": "Primary email",
            "format": "email",
            "example": "joebloggs@somewhere.com"
          },
          "dob": {
            "type": "string",
            "description": "Date of birth",
            "format": "date"
          },
          "sex": {
            "type": "string",
            "description": "Sex (specified or unspecified)",
            "enum": [
              "male",
              "female",
              "unspecified"
            ]
          },
          "sports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sport"
            }
          },
          "hasPaymentMethod": {
            "type": "boolean",
            "description": "True if this user has a payment method registered that can be used for off-line charges"
          },
          "clubs": {
            "type": "array",
            "description": "Set of clubs to which user is linked and the credit available",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Id"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the club",
                  "example": "Acme club"
                },
                "credit": {
                  "type": "number",
                  "description": "Amount of credit this user has (or their family head) that can be used to pay fees to this club",
                  "example": 18.5
                }
              }
            }
          },
          "familyGroup": {
            "type": "array",
            "description": "Lists all members of the family icluding this one",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Id"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the family member",
                  "example": "Joe Bloggs"
                },
                "clubs": {
                  "type": "array",
                  "description": "Clubs that thus family member is linked to giving their club status",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "$ref": "#/components/schemas/Id"
                      },
                      "member": {
                        "type": "boolean",
                        "description": "True if the user is a current member of this club"
                      },
                      "suspensions": {
                        "type": "array",
                        "description": "Reasons why booking may be prevented by the club.\n1. *virgin* means the club requires an initial deposit of funds\n2. *credit* means the user has unpaid fees that requires a topup\n3. *tandcs* means the club has Terms & Conditions that require agreement",
                        "example": [
                          "virgin",
                          "credit"
                        ],
                        "items": {
                          "type": "string",
                          "enum": [
                            "virgin",
                            "credit",
                            "tandcs"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CoachingSession": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "type": {
            "type": "string",
            "description": "Type of coaching session",
            "enum": [
              "individual",
              "group"
            ]
          },
          "independent": {
            "type": "boolean",
            "description": "True if coaching is from an independent provider (i.e. not the club)"
          },
          "sport": {
            "$ref": "#/components/schemas/Sport"
          },
          "affiliate": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "series": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "event": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "group": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "coach": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "club": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "note": {
            "type": "string",
            "description": "Notes on the nature of the coaching provided"
          },
          "courts": {
            "type": "array",
            "description": "Courts that are either booked or potentially bookable for the session",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "number",
                  "description": "The internal index number of the court",
                  "example": 0
                },
                "name": {
                  "type": "string",
                  "description": "The name of the court",
                  "example": "Ct 2"
                }
              }
            }
          },
          "attendance": {
            "type": "object",
            "properties": {
              "current": {
                "type": "integer",
                "description": "The number of clients attending the session",
                "example": 4
              },
              "maximum": {
                "type": "integer",
                "description": "The maximum number of clients permitted to attend the session",
                "example": 10
              }
            }
          },
          "time": {
            "type": "string",
            "description": "The date and time of the commencement of the session (UTC)",
            "format": "date-time",
            "example": "2017-05-15T09:10:23Z"
          },
          "participants": {
            "type": "array",
            "description": "list of clients currently attending - empty if no rights to see",
            "items": {
              "$ref": "#/components/schemas/ObjectIdentifier"
            }
          },
          "price": {
            "type": "number",
            "description": "The base price per session per client (excluding any discounts)",
            "example": 12.5
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "variablePrice": {
            "type": "boolean",
            "description": "True if the price depends on the number of attendants (i.e. shared)"
          },
          "coachSharesCourtFee": {
            "type": "boolean",
            "description": "True if the coach participates in the club's court fees - otherwise the client is paying the full fee (if applicable)"
          },
          "duration": {
            "type": "integer",
            "description": "The expected duration of the session in minutes",
            "example": 45
          },
          "clients": {
            "type": "array",
            "description": "A list of users that are eligible to sign up to the session from the users family group (if the user is identified).\nBy eligible we mean:\n1. That the user fits the eligibility requirements set by the coach on the group [Details](https://docs.managemymatch.com/hc/en-us/articles/360007571838-Setting-up-an-individual-coaching-group)\n2. That the group is not marked as private by the coach (in which case the coach maintains control of who is in their group)\n3. That the user fits the eligibility requirements set at the series level by an event manager - [series details](https://docs.managemymatch.com/hc/en-us/articles/360015393453-Series-definition)\n4. For individual coaching, the club must have granted court access (at the time of this session) to the user through membership or other means\n\nIf the user is already a `member` of the group then the first 3 conditions do not apply.\n\nThe user may still not be allowed to book the session due to reasons that can be fixed by the user.\n\nAn application may also decide to prevent signups based on other criteria such as the availability of credit or a payment means.\nBut MMM does not enforce this as payment is automatically taken at the time of the sessions and procedures are in place to recover unpaid fees.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Id"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the family member",
                  "example": "Joe"
                },
                "consent": {
                  "type": "boolean",
                  "description": "True if consent is either irrelevent or complete (Relevant for Juniors when participating in an event by an affiliate that has opted into Junior consent management)"
                },
                "participating": {
                  "type": "boolean",
                  "description": "True of the client is participating in this session",
                  "example": true
                },
                "waitlisted": {
                  "type": "boolean",
                  "description": "True if the client is wait-listed for this session",
                  "example": true
                },
                "price": {
                  "type": "number",
                  "description": "The price of the session for this user only (includes any discount).\nThis price is still given even if the user has `prepaid`",
                  "example": 10
                },
                "discount": {
                  "type": "number",
                  "description": "A possible % discount awarded to the client due to their membership status. 0 if no discount",
                  "example": 25
                },
                "clubFees": {
                  "type": "object",
                  "properties": {
                    "visitor": {
                      "type": "number",
                      "description": "Visitor fee if non member or no booking rights",
                      "example": 5
                    },
                    "light": {
                      "type": "number",
                      "description": "Specific fixed light fee set on a per court basis (sharable)",
                      "example": 1
                    },
                    "court": {
                      "type": "number",
                      "description": "Court usage fee (sharable)",
                      "example": 3.5
                    },
                    "base": {
                      "type": "object",
                      "properties": {
                        "light": {
                          "type": "number",
                          "description": "Unshared specific fixed light fee set on a per court basis",
                          "example": 2
                        },
                        "court": {
                          "type": "number",
                          "description": "Unshared court usage fee",
                          "example": 7
                        }
                      },
                      "description": "Base fees are what would be charged assuming no sharing"
                    }
                  },
                  "description": "Fees that can be charged by the club in addition to the coaching fee. These elements are always set to zero for group coaching sessions"
                },
                "prepaid": {
                  "type": "boolean",
                  "description": "True if this user has outstanding prepaid sessions available",
                  "example": true
                },
                "official": {
                  "type": "boolean",
                  "description": "True if the user is the leader, a deputy or an event organiser",
                  "example": false
                }
              }
            }
          }
        }
      },
      "BookingItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "details": {
            "type": "string",
            "description": "The purpose for which this booking has been made",
            "example": "Match"
          },
          "period": {
            "$ref": "#/components/schemas/DatePeriod"
          },
          "duration": {
            "type": "integer",
            "description": "Duration of booking in minutes",
            "example": 45
          },
          "court": {
            "type": "string",
            "description": "The court name",
            "example": "3"
          },
          "club": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          }
        }
      },
      "DatePeriod": {
        "required": [
          "end",
          "start"
        ],
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "description": "The start of the period (UTC)",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "The end of the period (UTC)",
            "format": "date-time"
          }
        }
      },
      "AffiliateType": {
        "type": "string",
        "description": "Affiliate types. Every club belongs to it's own captive affiliate that is of type \\\"club\\\"",
        "enum": [
          "club",
          "county",
          "coach",
          "collaboration",
          "education"
        ]
      },
      "AgeEligibility": {
        "type": "object",
        "properties": {
          "age": {
            "type": "number",
            "description": "Required age over or under (as per side). If age is zero then no restriction if side is 'over' and no entry for anyone if side is 'over'",
            "example": 16
          },
          "side": {
            "type": "string",
            "description": "\\\"over\\\" means age must be over that indicated, \\\"under\\\" means age must be under that indicated",
            "enum": [
              "over",
              "under"
            ]
          }
        },
        "description": "Age requirement for event entrants"
      },
      "Id": {
        "pattern": "^[a-zA-Z0-9]{17}$",
        "type": "string",
        "description": "Standard MMM document identifier",
        "example": "Zj7jE4rYuGgdrjHJE"
      },
      "EmptyId": {
        "pattern": "^[a-zA-Z0-9]{17}$",
        "type": "string",
        "description": "Standard MMM document identifier"
      },
      "ObjectIdentifier": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string",
            "description": "Name of the object associated with the id given above",
            "example": "Name of this object"
          }
        },
        "description": "Standard object identifier with id and Name"
      },
      "MatchType": {
        "type": "string",
        "description": "Type of match in terms of competition context",
        "enum": [
          "friendly",
          "box",
          "knockout",
          "monrad",
          "rubber",
          "team"
        ]
      },
      "MatchStatus": {
        "type": "string",
        "description": "Status of the match",
        "enum": [
          "pending",
          "completed",
          "walkover"
        ]
      },
      "Sport": {
        "type": "string",
        "description": "Supported court sports",
        "enum": [
          "squash",
          "lcsquash",
          "racquetball",
          "tennis",
          "shorttennis",
          "tabletennis",
          "padel",
          "badminton",
          "pickleball",
          "basketball",
          "3x3basketball",
          "netball",
          "bowls",
          "football",
          "7football",
          "5football",
          "exercise"
        ]
      },
      "GameScoringMethod": {
        "type": "string",
        "description": "Ways in which a single game can be scored (not a match which may consist of many games)\n\n- **None**: No scoring method defined\n- **HiHo**: Hi-Ho scoring (traditional 9-point scoring with hand-in/hand-out)\n- **PaR-6**: Point-a-Rally to 6 points\n- **PaR-7**: Point-a-Rally to 7 points\n- **PaR-10**: Point-a-Rally to 10 points\n- **PaR-11**: Point-a-Rally to 11 points (standard squash)\n- **PaR-13**: Point-a-Rally to 13 points\n- **PaR-11SD**: Point-a-Rally to 11 with sudden death at 10-10\n- **PaR-15**: Point-a-Rally to 15 points\n- **PaR15SD**: Point-a-Rally to 15 with sudden death at 14-14\n- **PaR21**: Point-a-Rally to 21 points\n- **Tennis**: Standard tennis scoring (15, 30, 40, game)\n- **Handicap**: Handicap-adjusted scoring\n- **Continuous**: Continuous rally scoring\n",
        "enum": [
          "None",
          "HiHo",
          "PaR-6",
          "PaR-7",
          "PaR-10",
          "PaR-11",
          "PaR-13",
          "PaR-11SD",
          "PaR-15",
          "PaR15SD",
          "PaR21",
          "Tennis",
          "Handicap",
          "Continuous"
        ]
      },
      "DrawType": {
        "type": "string",
        "description": "Types of tournament draw formats that can be used to organize competitive events:\n\n- **box**: Box League format where players within a box play each other once\n- **boxdouble**: Box League format where players within a box play each other twice\n- **single**: Single Elimination knockout draw (condensed format without explicit byes)\n- **double**: Double Elimination knockout draw (condensed format, players get a second chance after first loss)\n- **ltasingle**: Single Elimination knockout draw (LTA standard format with proper bye placement)\n- **ltadouble**: Double Elimination knockout draw (LTA standard format with proper bye placement)\n- **monrad**: Monrad Swiss-style tournament system with explicit byes as necessary\n- **monradnobyes**: Monrad Swiss-style tournament system (condensed format without explicit byes)\n- **none**: No structured draw format - adhoc matches only\n- **singleleague**: Intra-club League format for singles matches within a single club\n- **league**: Inter-club Team League format for team matches between different clubs\n",
        "enum": [
          "box",
          "boxdouble",
          "single",
          "double",
          "ltasingle",
          "ltadouble",
          "monrad",
          "monradnobyes",
          "none",
          "singleleague",
          "league"
        ]
      },
      "Match": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "numericId": {
            "type": "integer",
            "description": "A unique numeric identifier for the match (if any)",
            "example": 31486196
          },
          "description": {
            "type": "string",
            "description": "Match context and player details",
            "example": "Club Acme Squash 57 Leagues David Johnson vs Lucy Smith (League 3)"
          },
          "type": {
            "$ref": "#/components/schemas/MatchType"
          },
          "status": {
            "$ref": "#/components/schemas/MatchStatus"
          },
          "context": {
            "type": "object",
            "properties": {
              "section": {
                "$ref": "#/components/schemas/ObjectIdentifier"
              },
              "event": {
                "$ref": "#/components/schemas/ObjectIdentifier"
              },
              "series": {
                "$ref": "#/components/schemas/ObjectIdentifier"
              },
              "affiliate": {
                "$ref": "#/components/schemas/ObjectIdentifier"
              },
              "period": {
                "description": "The period of the event during which the match would be played (not included if the event is continuous)",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DatePeriod"
                  }
                ]
              }
            }
          },
          "sport": {
            "$ref": "#/components/schemas/Sport"
          },
          "creator": {
            "$ref": "#/components/schemas/ObjectIdentifier"
          },
          "lastChange": {
            "type": "string",
            "description": "The most recent time when match details were changed (UTC)",
            "format": "date-time"
          },
          "gameScoring": {
            "$ref": "#/components/schemas/GameScoringMethod"
          },
          "round": {
            "type": "integer",
            "description": "The round of the match in a knockout draw (1=first round)",
            "example": 1
          },
          "sequence": {
            "type": "integer",
            "description": "The sequence of the match within a round (1=first match)",
            "example": 3
          },
          "drawType": {
            "$ref": "#/components/schemas/DrawType"
          },
          "sides": {
            "type": "object",
            "properties": {
              "a": {
                "type": "object",
                "properties": {
                  "players": {
                    "type": "array",
                    "description": "List of players on side A",
                    "items": {
                      "$ref": "#/components/schemas/ObjectIdentifier"
                    }
                  },
                  "score": {
                    "type": "number",
                    "description": "The match score for side A",
                    "example": 3
                  }
                }
              },
              "b": {
                "type": "object",
                "properties": {
                  "players": {
                    "type": "array",
                    "description": "List of players on side B",
                    "items": {
                      "$ref": "#/components/schemas/ObjectIdentifier"
                    }
                  },
                  "score": {
                    "type": "number",
                    "description": "The match score for side B",
                    "example": 1
                  }
                }
              }
            }
          },
          "score": {
            "type": "string",
            "description": "The match score expressed in an appropriate format.\n\n- For single set matches (like Squash) where the games have been scored each game score is given\n- For multi-set matches (like Tennis) each set result is given\n",
            "example": "11-7,6-11,12-10,11-5"
          },
          "result": {
            "type": "string",
            "description": "Won/Lost/Drawn if completed",
            "example": "Won"
          },
          "booking": {
            "description": "The booking details for the match (if any)",
            "allOf": [
              {
                "$ref": "#/components/schemas/ObjectIdentifier"
              }
            ]
          },
          "club": {
            "description": "The club that hosted the match (if known)",
            "allOf": [
              {
                "$ref": "#/components/schemas/ObjectIdentifier"
              }
            ]
          },
          "playBy": {
            "type": "string",
            "description": "The date by which the match has to be played (if any)",
            "format": "date"
          },
          "playOn": {
            "type": "string",
            "description": "The date on which the fixture is scheduled to be played, but not necessarily booked (if any)",
            "format": "date"
          },
          "fixture": {
            "description": "The team fixture match if this is a rubber match (if any)",
            "allOf": [
              {
                "$ref": "#/components/schemas/ObjectIdentifier"
              }
            ]
          }
        }
      },
      "Currency": {
        "type": "string",
        "description": "3 letter ISO currency code",
        "example": "GBP",
        "enum": [
          "GBP"
        ]
      }
    },
    "responses": {
      "badUser": {
        "description": "Unauthorised access or user identified within the authorisation process is unrecognised or disallowed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "badParams": {
        "description": "Path, query or body parameters are either missing, invalid or superfluously specified",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "parameters": {
      "id": {
        "name": "id",
        "in": "path",
        "description": "Standard MMM document identifier",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "description": "The number of items to skip before starting to collect the result set.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "minimum": 0,
          "type": "integer",
          "default": 0
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "The maximum number of items to return.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "maximum": 500,
          "minimum": 1,
          "type": "integer",
          "default": 100
        }
      },
      "days": {
        "name": "days",
        "in": "query",
        "description": "The period in days in which to return results",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "maximum": 30,
          "minimum": 0,
          "type": "integer"
        }
      },
      "address": {
        "name": "address",
        "in": "query",
        "description": "A UK address or postcode",
        "required": true,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string"
        },
        "example": "AB12 3CD"
      },
      "coachingType": {
        "name": "type",
        "in": "query",
        "description": "Filter by type of session (individual or group)",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string",
          "enum": [
            "individual",
            "group"
          ]
        }
      },
      "affiliateId": {
        "name": "affiliateId",
        "in": "query",
        "description": "Filter by a single affiliate",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "seriesId": {
        "name": "seriesId",
        "in": "query",
        "description": "Filter by a single series",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "clubId": {
        "name": "clubId",
        "in": "query",
        "description": "Filter by a single club",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "eventId": {
        "name": "eventId",
        "in": "query",
        "description": "Filter by a single event",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "groupId": {
        "name": "groupId",
        "in": "query",
        "description": "Filter by a single coaching group",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "coachId": {
        "name": "coach",
        "in": "query",
        "description": "Filter by a particular coach",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/EmptyId"
        }
      },
      "involvement": {
        "name": "involvement",
        "in": "query",
        "description": "Filter by the users involvement",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string",
          "description": "Involvement level - Either as a coach representative or a user who is already a member of the coaching groups",
          "enum": [
            "ascoach",
            "asmember"
          ]
        }
      },
      "sport": {
        "name": "sport",
        "in": "query",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/Sport"
        }
      },
      "includeCredit": {
        "name": "includeCredit",
        "in": "query",
        "description": "True if we want to retrieve the member's club balance(s). This can be costly in terms of response time. If False, `clubs.credit` is set to 0",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "boolean"
        }
      },
      "includePayment": {
        "name": "includePayment",
        "in": "query",
        "description": "True if we want to retrieve the member's payment record. This can be costly in terms of response time. If False, `hasPaymentMethod` is always to false",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "boolean"
        }
      },
      "matchType": {
        "name": "matchType",
        "in": "query",
        "description": "Filter by the type of match - you can comma separate any of the options to select matches that belong to any of the types listed",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/MatchType"
        }
      },
      "matchStatus": {
        "name": "matchStatus",
        "in": "query",
        "description": "Filter by the status of the match",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "$ref": "#/components/schemas/MatchStatus"
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "description": "API key as provided by MMM in the developers section of My account. Alternatively you may be provided with one from MMM support.",
        "name": "x-api-key",
        "in": "header"
      },
      "access_token_v3": {
        "type": "apiKey",
        "description": "Either a secret key that can be generated for any specific user within the developers tab of My account, or a bearer token as delivered from an oauth2 authorization",
        "name": "accessToken",
        "in": "header",
        "x-amazon-apigateway-authtype": "custom",
        "x-amazon-apigateway-authorizer": {
          "authorizerUri": "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:705889014628:function:NewApiAuthorizer:${stageVariables.alias}/invocations",
          "authorizerResultTtlInSeconds": 0,
          "identitySource": "method.request.header.accessToken",
          "type": "request"
        }
      },
      "oauth2": {
        "type": "oauth2",
        "description": "Use a client Id that identifies a specific application that has been registered with MMM and the secret Id that is associated with the MMM user that registered that application",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.managemymatch.com/oauth/authorize",
            "tokenUrl": "https://app.managemymatch.com/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-aws-api-id": "4zh0y1uad7",
  "x-amazon-apigateway-request-validators": {
    "Validate body": {
      "validateRequestParameters": false,
      "validateRequestBody": true
    }
  }
}