{
  "openapi": "3.0.3",
  "info": {
    "title": "RemyPass Public API",
    "version": "1.0.0",
    "description": "OpenAPI specification for the RemyPass public API. Authenticated endpoints require an API key in the X-API-Key header and the relevant permission on that key. This specification covers the supported API-key integration endpoints. OAuth sign-in is documented separately at https://developer.remypass.com/oauth/reference. Unauthenticated hosted checkout, pricing and loyalty signup routes are outside this integration contract."
  },
  "servers": [
    {
      "url": "https://api.remypass.com/api/v1/public",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Members",
      "description": "Member management endpoints."
    },
    {
      "name": "Passes",
      "description": "Pass instance management endpoints."
    },
    {
      "name": "Pass Templates",
      "description": "Pass template discovery endpoints."
    },
    {
      "name": "Scans",
      "description": "Organisation-scoped scan history and lookup endpoints"
    },
    {
      "name": "Memberships",
      "description": "Organisation-scoped membership records and lookup endpoints"
    },
    {
      "name": "Events",
      "description": "Organisation-scoped events read endpoints"
    },
    {
      "name": "Event Registrations",
      "description": "Organisation-scoped event-registrations read endpoints"
    },
    {
      "name": "Event Orders",
      "description": "Organisation-scoped event-orders read endpoints"
    },
    {
      "name": "Donations",
      "description": "Organisation-scoped donations read endpoints"
    },
    {
      "name": "Donation Subscriptions",
      "description": "Organisation-scoped donation-subscriptions read endpoints"
    },
    {
      "name": "Donation Campaigns",
      "description": "Organisation-scoped donation-campaigns read endpoints"
    },
    {
      "name": "Membership Types",
      "description": "Organisation-scoped membership-types read endpoints"
    },
    {
      "name": "Webhook Subscriptions",
      "description": "API-key webhook subscription and delivery management"
    }
  ],
  "paths": {
    "/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "List members",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the members:read permission.",
        "x-code-examples": [
          {
            "title": "List members with pagination",
            "language": "bash",
            "code": "curl -X GET \"https://api.remypass.com/api/v1/public/members?limit=25&page=1&search=john&status=active\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Member",
                "Visitor"
              ]
            },
            "description": "Exact member category"
          },
          {
            "name": "title",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact title"
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive location search"
          },
          {
            "name": "flagged",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Whether the member is flagged"
          },
          {
            "name": "joinDateFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Inclusive memberSince lower bound"
          },
          {
            "name": "joinDateTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Inclusive memberSince end date"
          },
          {
            "name": "customFields",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{\"membershipLevel\":\"Gold\"}"
            },
            "description": "JSON-encoded field filters; checkbox and date fields use their configured types"
          },
          {
            "name": "passStatus",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "has_active",
                "no_active"
              ]
            },
            "description": "Filter on linked active passes"
          },
          {
            "name": "passExpiryFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Inclusive linked non-void pass expiry lower bound"
          },
          {
            "name": "passExpiryTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Inclusive linked non-void pass expiry end date"
          },
          {
            "name": "walletStatus",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "added",
                "not_added",
                "no_pass"
              ]
            },
            "description": "Filter on installed non-void passes"
          }
        ],
        "responses": {
          "200": {
            "description": "Members retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Member"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getMembers"
      },
      "post": {
        "tags": [
          "Members"
        ],
        "summary": "Create a member",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the members:write permission. The response data contains member, passInstance and assignment outcome flags. Member creation can succeed even if optional pass or membership assignment fails; inspect passIssued and membershipGrantFailed.",
        "x-code-examples": [
          {
            "title": "Create a new member",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/members \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Dr. Sarah Johnson\",\n    \"firstName\": \"Sarah\",\n    \"lastName\": \"Johnson\",\n    \"email\": \"sarah.johnson@example.com\",\n    \"title\": \"Dr\",\n    \"memberId\": \"MEM001\",\n    \"memberSince\": \"2024-01-15T00:00:00.000Z\",\n    \"phone\": \"+447700900123\",\n    \"dateOfBirth\": \"1990-04-20\",\n    \"gender\": \"female\",\n    \"notes\": \"Prefers email contact\",\n    \"type\": \"Member\",\n    \"status\": \"active\",\n    \"customFields\": {\n      \"department\": \"Engineering\",\n      \"membershipLevel\": \"Premium\"\n    }\n  }'"
          },
          {
            "title": "Create member with immediate pass issuance",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/members \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Ms\",\n    \"name\": \"Emily Chen\",\n    \"email\": \"emily.chen@example.com\",\n    \"memberId\": \"MEM002\",\n    \"issuePass\": true,\n    \"passTemplateId\": \"507f1f77bcf86cd799439012\",\n    \"expiryDate\": \"2024-12-31T23:59:59.000Z\"\n  }'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemberRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Member created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMemberResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "postMembers"
      }
    },
    "/members/{id}": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get a member",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the members:read permission.",
        "x-code-examples": [
          {
            "title": "Get member by ID",
            "language": "bash",
            "code": "curl -X GET https://api.remypass.com/api/v1/public/members/507f1f77bcf86cd799439011 \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "Member retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getMembersId"
      },
      "put": {
        "tags": [
          "Members"
        ],
        "summary": "Update a member",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the members:write permission.",
        "x-code-examples": [
          {
            "title": "Update member",
            "language": "bash",
            "code": "curl -X PUT https://api.remypass.com/api/v1/public/members/507f1f77bcf86cd799439011 \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Prof\",\n    \"name\": \"Prof. John Smith\",\n    \"phone\": \"+447700900124\",\n    \"dateOfBirth\": \"1988-09-12\",\n    \"gender\": \"male\",\n    \"notes\": \"Updated contact preference\",\n    \"memberId\": \"MEM001\",\n    \"status\": \"active\",\n    \"customFields\": {\n      \"department\": \"Research\",\n      \"position\": \"Senior Researcher\"\n    }\n  }'"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Member updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "putMembersId"
      }
    },
    "/passes": {
      "get": {
        "tags": [
          "Passes"
        ],
        "summary": "List pass instances",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:read permission.",
        "x-code-examples": [
          {
            "title": "List pass instances with filtering",
            "language": "bash",
            "code": "curl -X GET \"https://api.remypass.com/api/v1/public/passes?limit=50&page=1&status=active&memberId=507f1f77bcf86cd799439011\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "expired",
                "void"
              ]
            }
          },
          {
            "name": "memberId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "includeVoid",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "passType",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "generic",
                "eventTicket",
                "loyalty"
              ]
            },
            "description": "Exact pass type; loyalty results require a linked member"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive member name, email or member number search"
          },
          {
            "name": "addedToWallet",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "When true, return passes recorded as installed in Apple Wallet or Google Wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "Pass instances retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PassInstance"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getPasses"
      }
    },
    "/passes/issue": {
      "post": {
        "tags": [
          "Passes"
        ],
        "summary": "Issue a pass",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Issues a pass to a member, or an event ticket to a non-member recipient. Requires the passes:issue permission.",
        "x-banner": {
          "type": "info",
          "message": "Use this endpoint for all pass issuing. For standard member passes, provide memberId and passTemplateId, plus optional expiryDate, customFields, and sendEmail. For non-member event tickets, omit memberId and provide recipientName and recipientEmail instead. Non-member recipients are only supported for event ticket templates.\n\nFor event tickets, include eventName, eventTime, and any seatInfo required by the selected template. eventTime is optional only when the selected template is configured as redeemable any time. Section, row, and seat are required when visible; hidden seat fields can be omitted. Gate is optional for backwards compatibility, even when it is visible on the template. If the template only uses custom fields, omit seatInfo and provide those values in customFields.\n\nSet maxUses to issue a multi-use event ticket. If omitted, event tickets default to 1 use. Each successful ticket scan consumes one use and the ticket is automatically inactivated when no uses remain."
        },
        "x-docs-extra": "## Event Ticket Uses\n\nEvent ticket passes support a top-level `maxUses` field. Use this for tickets that can be scanned more than once, such as family ride tickets.\n\nIf `maxUses` is omitted, the ticket is issued with 1 use. Each successful ticket scan atomically consumes 1 use, records a redemption, updates `usesRemaining` and `redeemedCount`, and automatically inactivates the ticket when `usesRemaining` reaches 0.\n\nRepeat scans of the same ticket within the company's configured scan-ignore window are treated as duplicates: no use is consumed and the response indicates the scan was ignored.\n\n`maxUses` must be sent as a top-level field, not inside `customFields`.\n\n## Event Ticket Custom Fields\n\nFor event ticket templates, `customFields` can populate company-level custom fields configured on the pass design with a `custom_` dynamic field.\n\nUse a configured company custom field key in the API payload without the `custom_` prefix. For example, a pass design field with `dataField: \"custom_guardianSpaces\"` is populated by `customFields.guardianSpaces` when `guardianSpaces` exists in the company's custom field definitions.\n\nBuilt-in event ticket fields are supplied separately:\n\n| Pass design dynamic field | API source |\n| --- | --- |\n| `company_name` | The company name |\n| `event_name` | `eventName` |\n| `event_time` | `eventTime` |\n| `gate` | `seatInfo.gate` |\n| `screen` | `seatInfo.section` |\n| `row` | `seatInfo.row` |\n| `seat` | `seatInfo.seat` |\n| `ticket_max_uses` | `maxUses` |\n| `ticket_uses_remaining` | Remaining ticket uses after scans |\n| `ticket_redeemed_count` | Number of redeemed ticket uses |\n| `ticket_uses_progress` | Redeemed/maximum uses, for example `1/4` |\n| `custom_<key>` | `customFields.<key>` for a configured company custom field |\n\nGoogle Wallet stores row and seat as separate values (`seatInfo.row` and `seatInfo.seat`). Google may display them together as `Row / Seat`, but API payloads should continue to send them as separate `row` and `seat` fields. Do not send a combined `row_seat` field.\n\nIf a pass template hides one of the seat fields, omit the matching value from `seatInfo`. For example, when Gate is hidden, omit `seatInfo.gate`. When Row is hidden, omit `seatInfo.row`. If a template only uses custom fields in its information row, omit `seatInfo` entirely.\n\n## Issue Against an Existing Event\n\nSupply `eventId` to use an organisation-owned event's stored name and start time. This also enforces the event's ticket capacity. The event must not be cancelled. Find IDs with `GET /events` or `GET /event-records/{id}`.\n\nAn `eventId` is only valid with an event ticket template. Without it, supply the required event fields directly or through configured custom fields. Templates that allow redemption at any time do not require `eventTime`.\n",
        "x-code-examples": [
          {
            "title": "Issue a pass to a member",
            "description": "Use this for standard member pass templates.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/issue \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"memberId\": \"507f1f77bcf86cd799439011\",\n    \"passTemplateId\": \"507f1f77bcf86cd799439012\",\n    \"expiryDate\": \"2030-12-31T23:59:59.000Z\",\n    \"customFields\": {\n      \"membershipLevel\": \"Premium\",\n      \"accessLevel\": \"VIP\",\n      \"issueDate\": \"2030-01-15\"\n    },\n    \"sendEmail\": true\n  }'"
          },
          {
            "title": "Issue an event ticket pass to a member",
            "description": "Use this when the ticket recipient is already a member. Requires a pre-created event ticket template.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/issue \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"memberId\": \"507f1f77bcf86cd799439011\",\n    \"passTemplateId\": \"507f1f77bcf86cd799439012\",\n    \"eventTime\": \"2030-12-25T19:30:00.000Z\",\n    \"eventName\": \"The Matrix Reloaded\",\n    \"maxUses\": 4,\n    \"seatInfo\": {\n      \"seat\": \"A12\",\n      \"row\": \"A\",\n      \"section\": \"Screen 1\"\n    },\n    \"customFields\": {\n      \"guardianSpaces\": \"2\",\n      \"siblingSpaces\": \"1\",\n      \"under2s\": \"0\"\n    },\n    \"sendEmail\": true\n  }'"
          },
          {
            "title": "Issue a custom-field event ticket without seats",
            "description": "Use this when the selected event ticket template does not expose built-in Gate, Section, Row, or Seat fields.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/issue \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"memberId\": \"507f1f77bcf86cd799439011\",\n    \"passTemplateId\": \"69fb31b35a479408bfa08e62\",\n    \"eventTime\": \"2030-06-14T10:00:00.000Z\",\n    \"eventName\": \"Summer Splash Day\",\n    \"expiryDate\": \"2030-06-14T23:59:59.000Z\",\n    \"customFields\": {\n      \"guardianSpaces\": \"2\",\n      \"siblingSpaces\": \"1\",\n      \"under2s\": \"0\"\n    },\n    \"sendEmail\": true\n  }'"
          },
          {
            "title": "Issue an event ticket to a non-member",
            "description": "Use this when the ticket recipient is not a RemyPass member. Requires a pre-created event ticket template.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/issue \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"passTemplateId\": \"507f1f77bcf86cd799439012\",\n    \"recipientName\": \"John Doe\",\n    \"recipientEmail\": \"john@example.com\",\n    \"eventTime\": \"2030-12-25T19:30:00.000Z\",\n    \"eventName\": \"The Matrix Reloaded\",\n    \"maxUses\": 1,\n    \"seatInfo\": {\n      \"seat\": \"A12\",\n      \"row\": \"A\",\n      \"section\": \"Screen 1\"\n    },\n    \"sendEmail\": true\n  }'"
          },
          {
            "title": "Issue a ticket for an existing event",
            "description": "Uses the stored event name, start time and capacity",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/issue \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"memberId\":\"507f1f77bcf86cd799439011\",\"passTemplateId\":\"507f1f77bcf86cd799439012\",\"eventId\":\"507f1f77bcf86cd799439013\",\"seatInfo\":{\"gate\":\"North\",\"section\":\"Main\",\"row\":\"A\",\"seat\":\"12\"}}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssuePassRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pass issued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuePassResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Event ticket capacity reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "postPassesIssue"
      }
    },
    "/passes/{id}": {
      "get": {
        "tags": [
          "Passes"
        ],
        "summary": "Get a pass instance",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:read permission.",
        "x-code-examples": [
          {
            "title": "Get pass instance by ID",
            "language": "bash",
            "code": "curl -X GET https://api.remypass.com/api/v1/public/passes/507f1f77bcf86cd799439013 \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "Pass instance retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassInstanceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getPassesId"
      }
    },
    "/passes/{id}/revoke": {
      "post": {
        "tags": [
          "Passes"
        ],
        "summary": "Revoke a pass",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:revoke permission.",
        "x-code-examples": [
          {
            "title": "Revoke a pass permanently",
            "description": "Sets pass status to void. Voided passes cannot be reinstated; issue a new pass if needed.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/507f1f77bcf86cd799439013/revoke \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\""
          }
        ],
        "x-banner": {
          "type": "warning",
          "message": "Important: This action is permanent and irreversible. Voided passes cannot be reactivated using the reinstate endpoint."
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Pass instance is missing its organisation linkage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "postPassesIdRevoke"
      }
    },
    "/passes/{id}/reinstate": {
      "post": {
        "tags": [
          "Passes"
        ],
        "summary": "Reinstate a pass",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:reinstate permission.",
        "x-code-examples": [
          {
            "title": "Reinstate an inactive pass",
            "description": "Reactivates passes with inactive status. Cannot reinstate voided or expired passes.",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/507f1f77bcf86cd799439013/reinstate \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\""
          }
        ],
        "x-banner": {
          "type": "info",
          "message": "This endpoint only works for passes with inactive status. It cannot reinstate voided passes, which are permanently revoked; expired passes, which should use the Update pass expiry endpoint; or active passes, which are already active.\n\nUse cases:\n\n- Reactivating a member's passes when the member becomes active again\n- Reactivating a loyalty pass that was deactivated after reaching maximum stamps\n- Manually reactivating a pass that was previously set to inactive"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "Pass updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassMutationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Event ticket capacity reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "postPassesIdReinstate"
      }
    },
    "/passes/{id}/expiry": {
      "put": {
        "tags": [
          "Passes"
        ],
        "summary": "Update pass expiry",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:update_expiry permission. Send null to remove an expiry date.",
        "x-code-examples": [
          {
            "title": "Update pass expiry date",
            "description": "Automatically reactivates expired passes when setting a future expiry date.",
            "language": "bash",
            "code": "curl -X PUT https://api.remypass.com/api/v1/public/passes/507f1f77bcf86cd799439013/expiry \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"expiryDate\": \"2025-06-30T23:59:59.000Z\"\n  }'"
          }
        ],
        "x-banner": {
          "type": "info",
          "message": "- Setting a future expiry date automatically reactivates expired passes.\n- Expiry can only be updated for passes with active or expired status."
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePassExpiryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pass updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassMutationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Event ticket capacity reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "putPassesIdExpiry"
      }
    },
    "/passes/{id}/send-email": {
      "post": {
        "tags": [
          "Passes"
        ],
        "summary": "Send a pass email",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the passes:send_email permission.",
        "x-code-examples": [
          {
            "title": "Send pass email to member",
            "language": "bash",
            "code": "curl -X POST https://api.remypass.com/api/v1/public/passes/507f1f77bcf86cd799439013/send-email \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "postPassesIdSendEmail"
      }
    },
    "/pass-templates": {
      "get": {
        "tags": [
          "Pass Templates"
        ],
        "summary": "List pass templates",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the pass_templates:read permission.",
        "x-code-examples": [
          {
            "title": "List pass templates",
            "language": "bash",
            "code": "curl -X GET \"https://api.remypass.com/api/v1/public/pass-templates?limit=25&page=1&search=membership\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "generic",
                "eventTicket",
                "loyalty"
              ]
            },
            "description": "Exact pass template type"
          }
        ],
        "responses": {
          "200": {
            "description": "Pass templates retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PassTemplate"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getPassTemplates"
      }
    },
    "/pass-templates/{id}": {
      "get": {
        "tags": [
          "Pass Templates"
        ],
        "summary": "Get a pass template",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires the pass_templates:read permission.",
        "x-code-examples": [
          {
            "title": "Get pass template by ID",
            "language": "bash",
            "code": "curl -X GET https://api.remypass.com/api/v1/public/pass-templates/507f1f77bcf86cd799439012 \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "Pass template retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassTemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getPassTemplatesId"
      }
    },
    "/scans": {
      "get": {
        "tags": [
          "Scans"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires scans:read. Returns scan events belonging to the authenticated organisation. Results are ordered newest first by _id. Member and passInstance fields contain RemyPass IDs, not populated objects. Date bounds are inclusive; use UTC timestamps for unambiguous ranges.",
        "summary": "List scan events",
        "operationId": "listScans",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number, defaults to 1"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 10,
              "maximum": 100
            },
            "description": "Page size, defaults to 10, maximum 100"
          },
          {
            "name": "memberId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "RemyPass member _id"
          },
          {
            "name": "passInstanceId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "RemyPass pass instance _id"
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "IN",
                "OUT",
                "IGNORED",
                "STAMP_GIVEN",
                "TICKET_REDEEMED"
              ]
            },
            "description": "IN, OUT, IGNORED, STAMP_GIVEN, or TICKET_REDEEMED"
          },
          {
            "name": "result",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Exact scan result"
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ios",
                "android",
                "web",
                "mac",
                "system",
                "square"
              ]
            },
            "description": "ios, android, web, mac, system, or square"
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Exact scan location"
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt; must be on or after startDate"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Scan"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Insufficient permissions"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/scans/{id}": {
      "get": {
        "tags": [
          "Scans"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requires scans:read. Returns scan events belonging to the authenticated organisation.",
        "summary": "Get a scan event",
        "operationId": "getScan",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Scan"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Insufficient permissions"
          },
          "404": {
            "description": "Scan event not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/memberships": {
      "get": {
        "summary": "List memberships",
        "tags": [
          "Memberships"
        ],
        "description": "Requires the memberships:read permission. Returns memberships belonging to the authenticated organisation.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "memberId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "RemyPass member _id, not the custom member number"
          },
          {
            "name": "membershipTypeId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "Membership tier _id"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "past_due",
                "canceled",
                "expired",
                "refunded",
                "failed"
              ]
            },
            "description": "Exact stored membership status"
          },
          {
            "name": "paymentMode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "one_off",
                "subscription"
              ]
            },
            "description": "Membership payment mode"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Membership"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Success",
                  "data": [
                    {
                      "_id": "507f1f77bcf86cd799439011",
                      "member": "507f1f77bcf86cd799439012",
                      "membershipType": "507f1f77bcf86cd799439013",
                      "passInstance": "507f1f77bcf86cd799439014",
                      "status": "active",
                      "paymentMode": "subscription",
                      "amount": 25000,
                      "currency": "dkk",
                      "autoRenews": true,
                      "cancelAtPeriodEnd": true,
                      "currentPeriodStart": "2026-10-01T00:00:00.000Z",
                      "currentPeriodEnd": "2026-11-01T00:00:00.000Z",
                      "expiresAt": "2026-11-01T23:59:59.999Z",
                      "activatedAt": "2026-01-01T12:00:00.000Z",
                      "lastPaymentAt": "2026-10-01T00:00:00.000Z",
                      "cancellationRequestedAt": "2026-10-06T12:00:00.000Z",
                      "createdAt": "2026-01-01T12:00:00.000Z",
                      "updatedAt": "2026-10-06T12:00:00.000Z",
                      "stripe": {
                        "accountId": "acct_example",
                        "customerId": "cus_example",
                        "subscriptionId": "sub_example"
                      },
                      "paymentRecovery": {
                        "actionRequired": false,
                        "attemptCount": 0,
                        "nextPaymentAttempt": null,
                        "gracePeriodEndsAt": null
                      }
                    }
                  ],
                  "pagination": {
                    "currentPage": 1,
                    "totalPages": 1,
                    "totalItems": 1,
                    "itemsPerPage": 10,
                    "hasNextPage": false,
                    "hasPrevPage": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          },
          "401": {
            "description": "Invalid API key"
          },
          "403": {
            "description": "Missing permission or plan access"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Server error"
          }
        },
        "x-docs-extra": "## Membership status and billing\n\n`status` is the stored RemyPass membership state, updated through payment webhooks. It is separate from pass status and is not a live Stripe subscription lookup. Scheduled cancellation keeps the existing status and sets `cancelAtPeriodEnd` to `true`.\n\nAmounts use minor currency units. Dates and relationship IDs may be absent or null when unavailable. `stripe` contains account, customer and subscription IDs for reconciliation; `paymentRecovery` contains action-required, attempt-count, next-attempt and grace-period details. Checkout secrets, buyer information and internal metadata are excluded.",
        "x-code-examples": [
          {
            "title": "List a member’s memberships with pagination",
            "language": "bash",
            "code": "curl -X GET \"https://api.remypass.com/api/v1/public/memberships?memberId=507f1f77bcf86cd799439012&limit=25&page=1\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "operationId": "getMemberships"
      }
    },
    "/memberships/{id}": {
      "get": {
        "summary": "Get a membership",
        "tags": [
          "Memberships"
        ],
        "description": "Requires the memberships:read permission. Returns memberships belonging to the authenticated organisation.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "Membership _id, also returned as memberMembershipId on linked passes"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Membership"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Success",
                  "data": {
                    "_id": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439012",
                    "membershipType": "507f1f77bcf86cd799439013",
                    "passInstance": "507f1f77bcf86cd799439014",
                    "status": "active",
                    "paymentMode": "subscription",
                    "amount": 25000,
                    "currency": "dkk",
                    "autoRenews": true,
                    "cancelAtPeriodEnd": true,
                    "currentPeriodStart": "2026-10-01T00:00:00.000Z",
                    "currentPeriodEnd": "2026-11-01T00:00:00.000Z",
                    "expiresAt": "2026-11-01T23:59:59.999Z",
                    "activatedAt": "2026-01-01T12:00:00.000Z",
                    "lastPaymentAt": "2026-10-01T00:00:00.000Z",
                    "cancellationRequestedAt": "2026-10-06T12:00:00.000Z",
                    "createdAt": "2026-01-01T12:00:00.000Z",
                    "updatedAt": "2026-10-06T12:00:00.000Z",
                    "stripe": {
                      "accountId": "acct_example",
                      "customerId": "cus_example",
                      "subscriptionId": "sub_example"
                    },
                    "paymentRecovery": {
                      "actionRequired": false,
                      "attemptCount": 0,
                      "nextPaymentAttempt": null,
                      "gracePeriodEndsAt": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          },
          "401": {
            "description": "Invalid API key"
          },
          "403": {
            "description": "Missing permission or plan access"
          },
          "404": {
            "description": "Membership not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Server error"
          }
        },
        "x-docs-extra": "## Membership status and billing\n\n`status` is the stored RemyPass membership state, updated through payment webhooks. It is separate from pass status and is not a live Stripe subscription lookup. Scheduled cancellation keeps the existing status and sets `cancelAtPeriodEnd` to `true`.\n\nAmounts use minor currency units. Dates and relationship IDs may be absent or null when unavailable. `stripe` contains account, customer and subscription IDs for reconciliation; `paymentRecovery` contains action-required, attempt-count, next-attempt and grace-period details. Checkout secrets, buyer information and internal metadata are excluded.",
        "x-code-examples": [
          {
            "title": "Get membership by ID",
            "language": "bash",
            "code": "curl -X GET \"https://api.remypass.com/api/v1/public/memberships/507f1f77bcf86cd799439011\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
          }
        ],
        "operationId": "getMembershipsId"
      }
    },
    "/events": {
      "get": {
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "description": "Requires the events:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "unlisted",
                "cancelled"
              ]
            },
            "description": "Exact stored event status"
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "members",
                "public"
              ]
            },
            "description": "Event audience"
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Exact event slug"
          },
          {
            "name": "startsAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive lower bound on startsAt"
          },
          {
            "name": "startsBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive upper bound on startsAt"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Case-insensitive literal search over name, slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.",
        "operationId": "getEvents"
      }
    },
    "/event-registrations": {
      "get": {
        "summary": "List event registrations",
        "tags": [
          "Event Registrations"
        ],
        "description": "Requires the event_registrations:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass event _id"
          },
          {
            "name": "memberId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass member _id"
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass event order _id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "cancelled"
              ]
            },
            "description": "Registration status"
          },
          {
            "name": "paymentStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "free",
                "paid",
                "pending",
                "refund_pending",
                "refund_failed",
                "refunded",
                "disputed"
              ]
            },
            "description": "Registration payment status"
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "buyer",
                "guest"
              ]
            },
            "description": "Registrant role"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Exact registrant email, case-insensitive"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventRegistration"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.\n\nUse ticketPassInstance with GET /scans?passInstanceId=PASS_ID to retrieve attendance scans. Use order with `GET /event-orders/{id}` to fetch the order.",
        "operationId": "getEventRegistrations"
      }
    },
    "/event-registrations/{id}": {
      "get": {
        "summary": "Get event registration",
        "tags": [
          "Event Registrations"
        ],
        "description": "Requires the event_registrations:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/EventRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nUse ticketPassInstance with GET /scans?passInstanceId=PASS_ID to retrieve attendance scans. Use order with `GET /event-orders/{id}` to fetch the order.",
        "operationId": "getEventRegistrationsId"
      }
    },
    "/event-orders": {
      "get": {
        "summary": "List event orders",
        "tags": [
          "Event Orders"
        ],
        "description": "Requires the event_orders:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass event _id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "cancelled"
              ]
            },
            "description": "Order status"
          },
          {
            "name": "paymentStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "free",
                "paid",
                "pending",
                "refund_pending",
                "refund_failed",
                "refunded",
                "partially_refunded",
                "disputed"
              ]
            },
            "description": "Order payment status"
          },
          {
            "name": "fulfillmentStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "fulfilled",
                "failed",
                "refund_pending",
                "refunded"
              ]
            },
            "description": "Ticket fulfillment status"
          },
          {
            "name": "ticketMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "named",
                "generic"
              ]
            },
            "description": "Ticket mode"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventOrder"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.\n\nFetch order attendees and buyer details using GET /event-registrations?orderId=ORDER_ID. Orders do not embed registration records.",
        "operationId": "getEventOrders"
      }
    },
    "/event-orders/{id}": {
      "get": {
        "summary": "Get event order",
        "tags": [
          "Event Orders"
        ],
        "description": "Requires the event_orders:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/EventOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nFetch order attendees and buyer details using GET /event-registrations?orderId=ORDER_ID. Orders do not embed registration records.",
        "operationId": "getEventOrdersId"
      }
    },
    "/donations": {
      "get": {
        "summary": "List donations",
        "tags": [
          "Donations"
        ],
        "description": "Requires the donations:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass donation campaign _id"
          },
          {
            "name": "memberId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass member _id"
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass donation subscription _id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "paid",
                "failed",
                "refund_pending",
                "partially_refunded",
                "refunded",
                "disputed",
                "dispute_lost"
              ]
            },
            "description": "Donation payment status"
          },
          {
            "name": "frequency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "one_off",
                "monthly"
              ]
            },
            "description": "Donation frequency"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Exact donor email, case-insensitive"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z]{3}$",
              "example": "gbp"
            },
            "description": "Three-letter currency code, case-insensitive"
          },
          {
            "name": "anonymous",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Whether the donor requested anonymity on public displays"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Donation"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.",
        "operationId": "getDonations"
      }
    },
    "/donations/{id}": {
      "get": {
        "summary": "Get donation",
        "tags": [
          "Donations"
        ],
        "description": "Requires the donations:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Donation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.",
        "operationId": "getDonationsId"
      }
    },
    "/donation-subscriptions": {
      "get": {
        "summary": "List donation subscriptions",
        "tags": [
          "Donation Subscriptions"
        ],
        "description": "Requires the donation_subscriptions:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass donation campaign _id"
          },
          {
            "name": "memberId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass member _id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "past_due",
                "cancelled"
              ]
            },
            "description": "Stored recurring donation status"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Exact donor email, case-insensitive"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z]{3}$",
              "example": "gbp"
            },
            "description": "Three-letter currency code, case-insensitive"
          },
          {
            "name": "cancelAtPeriodEnd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Whether cancellation is scheduled at the period end"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DonationSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.\n\nFetch individual recurring payments using GET /donations?subscriptionId=SUBSCRIPTION_ID.",
        "operationId": "getDonationSubscriptions"
      }
    },
    "/donation-subscriptions/{id}": {
      "get": {
        "summary": "Get donation subscription",
        "tags": [
          "Donation Subscriptions"
        ],
        "description": "Requires the donation_subscriptions:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DonationSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nFetch individual recurring payments using GET /donations?subscriptionId=SUBSCRIPTION_ID.",
        "operationId": "getDonationSubscriptionsId"
      }
    },
    "/donation-campaigns": {
      "get": {
        "summary": "List donation campaigns",
        "tags": [
          "Donation Campaigns"
        ],
        "description": "Requires the donation_campaigns:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "archived"
              ]
            },
            "description": "Campaign status"
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Exact campaign slug"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z]{3}$",
              "example": "gbp"
            },
            "description": "Three-letter currency code, case-insensitive"
          },
          {
            "name": "allowRecurring",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Whether monthly giving is enabled"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Case-insensitive literal search over title, slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DonationCampaign"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.",
        "operationId": "getDonationCampaigns"
      }
    },
    "/donation-campaigns/{id}": {
      "get": {
        "summary": "Get donation campaign",
        "tags": [
          "Donation Campaigns"
        ],
        "description": "Requires the donation_campaigns:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DonationCampaign"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.",
        "operationId": "getDonationCampaignsId"
      }
    },
    "/membership-types": {
      "get": {
        "summary": "List membership types",
        "tags": [
          "Membership Types"
        ],
        "description": "Requires the membership_types:read permission. Returns records belonging to the authenticated organisation, including unpublished or inactive records unless filtered.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Whether the membership type is active"
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass membership type group _id"
          },
          {
            "name": "renewalMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "required"
              ]
            },
            "description": "Matches a pricing option with this renewal mode"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on updatedAt"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 lower bound on createdAt"
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive ISO 8601 upper bound on createdAt"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Case-insensitive literal search over name"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MembershipType"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.\n\nList responses sort by `updatedAt` ascending, then `_id` ascending. Keep the same filters while paging. `updatedSince` is inclusive and requires a timezone. See [incremental sync](/querying#incremental-sync) for overlap, deduplication and deletion handling.",
        "operationId": "getMembershipTypes"
      }
    },
    "/membership-types/{id}": {
      "get": {
        "summary": "Get membership type",
        "tags": [
          "Membership Types"
        ],
        "description": "Requires the membership_types:read permission. A missing record or a record owned by another organisation returns 404.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MembershipType"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **minor currency units** (for example, GBP 25.50 is returned as 2550). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.",
        "operationId": "getMembershipTypesId"
      }
    },
    "/webhook-subscriptions": {
      "get": {
        "summary": "List webhook subscriptions",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:read, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive lower bound on updatedAt; use an ISO 8601 timestamp with a timezone"
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Whether delivery is enabled"
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "scan.created",
                "member.created",
                "member.updated",
                "member.status_changed",
                "member.deleted",
                "membership.created",
                "membership.updated",
                "membership.activated",
                "membership.renewed",
                "membership.expiring",
                "membership.expired",
                "membership.cancellation_scheduled",
                "membership.cancellation_revoked",
                "membership.cancelled",
                "membership.payment_succeeded",
                "membership.payment_failed",
                "membership.refund_created",
                "membership.refund_succeeded",
                "membership.refund_failed",
                "membership_type.created",
                "membership_type.updated",
                "membership_type.archived",
                "membership_type.deleted",
                "event.created",
                "event.updated",
                "event.published",
                "event.unpublished",
                "event.visibility_changed",
                "event.cancelled",
                "event.deleted",
                "event_registration.created",
                "event_registration.confirmed",
                "event_registration.updated",
                "event_registration.cancelled",
                "event_registration.checked_in",
                "event_order.created",
                "event_order.confirmed",
                "event_order.cancelled",
                "event_order.payment_succeeded",
                "event_order.payment_failed",
                "event_order.refund_created",
                "event_order.refund_succeeded",
                "event_order.refund_failed",
                "donation.created",
                "donation.payment_succeeded",
                "donation.payment_failed",
                "donation.refund_created",
                "donation.refund_succeeded",
                "donation.refund_failed",
                "donation.dispute_opened",
                "donation.dispute_closed",
                "donation_subscription.created",
                "donation_subscription.activated",
                "donation_subscription.updated",
                "donation_subscription.past_due",
                "donation_subscription.cancellation_scheduled",
                "donation_subscription.cancellation_revoked",
                "donation_subscription.cancelled",
                "donation_campaign.created",
                "donation_campaign.updated",
                "donation_campaign.published",
                "donation_campaign.unpublished",
                "donation_campaign.deleted"
              ],
              "example": "member.created"
            },
            "description": "Subscriptions containing this event"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicWebhookSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "Signing secrets and custom header values are excluded. Results sort by updatedAt ascending, then _id ascending. updatedSince is inclusive.",
        "operationId": "getWebhookSubscriptions"
      },
      "post": {
        "summary": "Create webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:write, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookSubscription"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created; signing secret is returned once",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PublicWebhookSubscription"
                        },
                        {
                          "type": "object",
                          "required": [
                            "secret"
                          ],
                          "properties": {
                            "secret": {
                              "type": "string",
                              "description": "Signing secret returned only on creation; store securely",
                              "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "The organisation subscription limit is enforced (default 5). New subscriptions are active. Creation validates URL syntax without sending a request to the receiver. Use the test endpoint to verify signed delivery. Store the returned secret securely; subsequent reads and updates exclude it. Secret rotation remains available in the Integrations UI.",
        "operationId": "postWebhookSubscriptions"
      }
    },
    "/webhook-subscriptions/{id}": {
      "get": {
        "summary": "Get webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:read, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "operationId": "getWebhookSubscriptionsId"
      },
      "put": {
        "summary": "Update webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:write, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookSubscription"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "Only supplied fields are changed. Headers replace the existing map. Setting active to false stops queued delivery when workers next check access. Signing secrets and custom header values are excluded from the response.",
        "operationId": "putWebhookSubscriptionsId"
      },
      "delete": {
        "summary": "Delete webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:write, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted; data is null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "object",
                      "nullable": true,
                      "enum": [
                        null
                      ],
                      "example": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "Deletes delivery history and removes the subscription from pending event recipients. An HTTP request already in progress may complete.",
        "operationId": "deleteWebhookSubscriptionsId"
      }
    },
    "/webhook-subscriptions/events": {
      "get": {
        "summary": "Get webhook event catalogue",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:read, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "groups": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": "Resource names mapped to supported action names",
                          "example": {
                            "scan": [
                              "created"
                            ],
                            "member": [
                              "created",
                              "updated",
                              "status_changed",
                              "deleted"
                            ],
                            "membership": [
                              "created",
                              "updated",
                              "activated",
                              "renewed",
                              "expiring",
                              "expired",
                              "cancellation_scheduled",
                              "cancellation_revoked",
                              "cancelled",
                              "payment_succeeded",
                              "payment_failed",
                              "refund_created",
                              "refund_succeeded",
                              "refund_failed"
                            ],
                            "membership_type": [
                              "created",
                              "updated",
                              "archived",
                              "deleted"
                            ],
                            "event": [
                              "created",
                              "updated",
                              "published",
                              "unpublished",
                              "visibility_changed",
                              "cancelled",
                              "deleted"
                            ],
                            "event_registration": [
                              "created",
                              "confirmed",
                              "updated",
                              "cancelled",
                              "checked_in"
                            ],
                            "event_order": [
                              "created",
                              "confirmed",
                              "cancelled",
                              "payment_succeeded",
                              "payment_failed",
                              "refund_created",
                              "refund_succeeded",
                              "refund_failed"
                            ],
                            "donation": [
                              "created",
                              "payment_succeeded",
                              "payment_failed",
                              "refund_created",
                              "refund_succeeded",
                              "refund_failed",
                              "dispute_opened",
                              "dispute_closed"
                            ],
                            "donation_subscription": [
                              "created",
                              "activated",
                              "updated",
                              "past_due",
                              "cancellation_scheduled",
                              "cancellation_revoked",
                              "cancelled"
                            ],
                            "donation_campaign": [
                              "created",
                              "updated",
                              "published",
                              "unpublished",
                              "deleted"
                            ]
                          }
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "event": {
                                "type": "string",
                                "enum": [
                                  "scan.created",
                                  "member.created",
                                  "member.updated",
                                  "member.status_changed",
                                  "member.deleted",
                                  "membership.created",
                                  "membership.updated",
                                  "membership.activated",
                                  "membership.renewed",
                                  "membership.expiring",
                                  "membership.expired",
                                  "membership.cancellation_scheduled",
                                  "membership.cancellation_revoked",
                                  "membership.cancelled",
                                  "membership.payment_succeeded",
                                  "membership.payment_failed",
                                  "membership.refund_created",
                                  "membership.refund_succeeded",
                                  "membership.refund_failed",
                                  "membership_type.created",
                                  "membership_type.updated",
                                  "membership_type.archived",
                                  "membership_type.deleted",
                                  "event.created",
                                  "event.updated",
                                  "event.published",
                                  "event.unpublished",
                                  "event.visibility_changed",
                                  "event.cancelled",
                                  "event.deleted",
                                  "event_registration.created",
                                  "event_registration.confirmed",
                                  "event_registration.updated",
                                  "event_registration.cancelled",
                                  "event_registration.checked_in",
                                  "event_order.created",
                                  "event_order.confirmed",
                                  "event_order.cancelled",
                                  "event_order.payment_succeeded",
                                  "event_order.payment_failed",
                                  "event_order.refund_created",
                                  "event_order.refund_succeeded",
                                  "event_order.refund_failed",
                                  "donation.created",
                                  "donation.payment_succeeded",
                                  "donation.payment_failed",
                                  "donation.refund_created",
                                  "donation.refund_succeeded",
                                  "donation.refund_failed",
                                  "donation.dispute_opened",
                                  "donation.dispute_closed",
                                  "donation_subscription.created",
                                  "donation_subscription.activated",
                                  "donation_subscription.updated",
                                  "donation_subscription.past_due",
                                  "donation_subscription.cancellation_scheduled",
                                  "donation_subscription.cancellation_revoked",
                                  "donation_subscription.cancelled",
                                  "donation_campaign.created",
                                  "donation_campaign.updated",
                                  "donation_campaign.published",
                                  "donation_campaign.unpublished",
                                  "donation_campaign.deleted"
                                ],
                                "example": "member.created"
                              },
                              "sample": {
                                "type": "object",
                                "additionalProperties": true
                              }
                            }
                          },
                          "example": [
                            {
                              "event": "scan.created",
                              "sample": {
                                "scan": {
                                  "id": "507f1f77bcf86cd799439011",
                                  "company": "507f1f77bcf86cd799439010",
                                  "source": "web",
                                  "member": {
                                    "id": "507f1f77bcf86cd799439011",
                                    "name": "Example Member",
                                    "email": "member@example.com",
                                    "memberId": "MEM001"
                                  },
                                  "input": "EXAMPLE",
                                  "result": "success",
                                  "timestamp": "2030-05-01T18:00:00.000Z"
                                }
                              }
                            },
                            {
                              "event": "member.created",
                              "sample": {
                                "member": {
                                  "id": "507f1f77bcf86cd799439011",
                                  "company": "507f1f77bcf86cd799439010",
                                  "memberId": "MEM001",
                                  "name": "Example Member",
                                  "email": "member@example.com",
                                  "status": "active"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "Returns the complete supported event list, resource groups and sample data for each event. Samples are synthetic examples, not organisation records. The catalogue is not paginated.",
        "operationId": "getWebhookSubscriptionsEvents"
      }
    },
    "/webhook-subscriptions/{id}/deliveries": {
      "get": {
        "summary": "List webhook deliveries",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:read, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Results per page"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-10-06T12:00:00.000Z"
            },
            "description": "Inclusive lower bound on updatedAt; use an ISO 8601 timestamp with a timezone"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "success",
                "failed",
                "cancelled"
              ]
            },
            "description": "Delivery status"
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "scan.created",
                "member.created",
                "member.updated",
                "member.status_changed",
                "member.deleted",
                "membership.created",
                "membership.updated",
                "membership.activated",
                "membership.renewed",
                "membership.expiring",
                "membership.expired",
                "membership.cancellation_scheduled",
                "membership.cancellation_revoked",
                "membership.cancelled",
                "membership.payment_succeeded",
                "membership.payment_failed",
                "membership.refund_created",
                "membership.refund_succeeded",
                "membership.refund_failed",
                "membership_type.created",
                "membership_type.updated",
                "membership_type.archived",
                "membership_type.deleted",
                "event.created",
                "event.updated",
                "event.published",
                "event.unpublished",
                "event.visibility_changed",
                "event.cancelled",
                "event.deleted",
                "event_registration.created",
                "event_registration.confirmed",
                "event_registration.updated",
                "event_registration.cancelled",
                "event_registration.checked_in",
                "event_order.created",
                "event_order.confirmed",
                "event_order.cancelled",
                "event_order.payment_succeeded",
                "event_order.payment_failed",
                "event_order.refund_created",
                "event_order.refund_succeeded",
                "event_order.refund_failed",
                "donation.created",
                "donation.payment_succeeded",
                "donation.payment_failed",
                "donation.refund_created",
                "donation.refund_succeeded",
                "donation.refund_failed",
                "donation.dispute_opened",
                "donation.dispute_closed",
                "donation_subscription.created",
                "donation_subscription.activated",
                "donation_subscription.updated",
                "donation_subscription.past_due",
                "donation_subscription.cancellation_scheduled",
                "donation_subscription.cancellation_revoked",
                "donation_subscription.cancelled",
                "donation_campaign.created",
                "donation_campaign.updated",
                "donation_campaign.published",
                "donation_campaign.unpublished",
                "donation_campaign.deleted"
              ],
              "example": "member.created"
            },
            "description": "Event type"
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Stable webhook payload event ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "History is retained for approximately 90 days and includes event payloads, attempts, status codes and errors. Worker lease details are excluded. Results sort by updatedAt ascending, then _id ascending. updatedSince is inclusive.",
        "operationId": "getWebhookSubscriptionsIdDeliveries"
      }
    },
    "/webhook-subscriptions/{id}/test": {
      "post": {
        "summary": "Test webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:write, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "event"
                ],
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "scan.created",
                      "member.created",
                      "member.updated",
                      "member.status_changed",
                      "member.deleted",
                      "membership.created",
                      "membership.updated",
                      "membership.activated",
                      "membership.renewed",
                      "membership.expiring",
                      "membership.expired",
                      "membership.cancellation_scheduled",
                      "membership.cancellation_revoked",
                      "membership.cancelled",
                      "membership.payment_succeeded",
                      "membership.payment_failed",
                      "membership.refund_created",
                      "membership.refund_succeeded",
                      "membership.refund_failed",
                      "membership_type.created",
                      "membership_type.updated",
                      "membership_type.archived",
                      "membership_type.deleted",
                      "event.created",
                      "event.updated",
                      "event.published",
                      "event.unpublished",
                      "event.visibility_changed",
                      "event.cancelled",
                      "event.deleted",
                      "event_registration.created",
                      "event_registration.confirmed",
                      "event_registration.updated",
                      "event_registration.cancelled",
                      "event_registration.checked_in",
                      "event_order.created",
                      "event_order.confirmed",
                      "event_order.cancelled",
                      "event_order.payment_succeeded",
                      "event_order.payment_failed",
                      "event_order.refund_created",
                      "event_order.refund_succeeded",
                      "event_order.refund_failed",
                      "donation.created",
                      "donation.payment_succeeded",
                      "donation.payment_failed",
                      "donation.refund_created",
                      "donation.refund_succeeded",
                      "donation.refund_failed",
                      "donation.dispute_opened",
                      "donation.dispute_closed",
                      "donation_subscription.created",
                      "donation_subscription.activated",
                      "donation_subscription.updated",
                      "donation_subscription.past_due",
                      "donation_subscription.cancellation_scheduled",
                      "donation_subscription.cancellation_revoked",
                      "donation_subscription.cancelled",
                      "donation_campaign.created",
                      "donation_campaign.updated",
                      "donation_campaign.published",
                      "donation_campaign.unpublished",
                      "donation_campaign.deleted"
                    ],
                    "example": "member.created"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Synthetic delivery queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/WebhookPayload"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "The subscription must be active. Any supported event can be tested, including events outside its selection. The payload has test: true and source: api. A 202 response means queued, not delivered; inspect delivery history for the outcome.",
        "operationId": "postWebhookSubscriptionsIdTest"
      }
    },
    "/webhook-subscriptions/{id}/deliveries/{deliveryId}/replay": {
      "post": {
        "summary": "Replay webhook delivery",
        "tags": [
          "Webhook Subscriptions"
        ],
        "description": "Requires webhooks:write, public API access and webhook access for the organisation. ",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          },
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass delivery record _id, distinct from the payload event ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery queued again",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Delivery is missing, belongs to another subscription, or is already pending/processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "The subscription must be active. Only success, failed and cancelled deliveries can be replayed. The original payload and event ID are preserved, attempts reset to zero and replayCount increases. Delivery uses the current URL, headers and signing secret. Deduplicate by payload.id. A 200 response means queued, not delivered.",
        "operationId": "postWebhookSubscriptionsIdDeliveriesDeliveryIdReplay"
      }
    },
    "/event-records/{id}": {
      "get": {
        "summary": "Get event",
        "tags": [
          "Events"
        ],
        "description": "Requires the events:read permission. A missing record or a record owned by another organisation returns 404. Uses a separate path so existing public event browsing URLs remain unchanged.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011"
            },
            "description": "RemyPass resource _id"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Success"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Event"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-docs-extra": "## Data and reconciliation\n\nAmounts use **major currency units** (for example, GBP 25.50 is returned as 25.5). Currency codes are lowercase. Relationship fields contain RemyPass record IDs; use the matching get endpoint to fetch related records. Optional relationships and dates may be absent or null. Checkout tokens, internal metadata, payment-provider credentials and worker leases are excluded.",
        "operationId": "getEventRecordsId"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "API key in X-API-Key. Authorization: Bearer <API_KEY> is also accepted; use one authentication header per request"
      }
    },
    "parameters": {
      "Id": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-fA-F0-9]{24}$"
        }
      },
      "PassInstanceId": {
        "name": "passInstanceId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-fA-F0-9]{24}$"
        }
      },
      "QrCode": {
        "name": "qrCode",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9]{8}$"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        }
      },
      "Page": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      }
    },
    "responses": {
      "Success": {
        "description": "Successful operation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessResponse"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad request. The top-level message explains what is invalid and, where applicable, the errors array contains structured field details.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller is not allowed to access this resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ServerError": {
        "description": "Server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessResponse": {
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          },
          "data": {
            "nullable": true
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string",
            "description": "Actionable error reason suitable for displaying directly in an integration client.",
            "example": "memberId must be the RemyPass member _id returned by the members API"
          },
          "errors": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "error": {
                    "type": "string",
                    "enum": [
                      "RATE_LIMIT_EXCEEDED",
                      "DAILY_RATE_LIMIT_EXCEEDED"
                    ]
                  },
                  "limit": {
                    "type": "integer"
                  },
                  "remaining": {
                    "type": "integer"
                  },
                  "resetTime": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "retryAfter": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "supportMessage": {
                    "type": "string"
                  }
                }
              }
            ],
            "description": "Validation details are an array; rate-limit details are an object"
          }
        }
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "example": 1
          },
          "totalPages": {
            "type": "integer",
            "example": 5
          },
          "totalItems": {
            "type": "integer",
            "example": 47
          },
          "itemsPerPage": {
            "type": "integer",
            "example": 10
          },
          "hasNextPage": {
            "type": "boolean",
            "example": true
          },
          "hasPrevPage": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "PaginatedResponse": {
        "type": "object",
        "required": [
          "success",
          "message",
          "data",
          "pagination"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {}
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "MemberAddress": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "type": "string",
            "maxLength": 200,
            "example": "23 Gastons Road"
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 200,
            "example": ""
          },
          "city": {
            "type": "string",
            "maxLength": 120,
            "example": "London"
          },
          "region": {
            "type": "string",
            "description": "State, county, province, or region.",
            "maxLength": 120,
            "example": "Greater London"
          },
          "postalCode": {
            "type": "string",
            "maxLength": 40,
            "example": "SW1A 1AA"
          },
          "country": {
            "type": "string",
            "description": "Country name or ISO country code.",
            "maxLength": 120,
            "example": "United Kingdom"
          }
        }
      },
      "MemberContactPreferences": {
        "type": "object",
        "description": "Optional marketing communication preferences. Essential service communications are unaffected.",
        "properties": {
          "email": {
            "type": "boolean",
            "default": false
          },
          "post": {
            "type": "boolean",
            "default": false
          },
          "phone": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "Member": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "example": "507f1f77bcf86cd799439011"
          },
          "title": {
            "type": "string",
            "description": "Optional member title or honorific.",
            "enum": [
              "Mr",
              "Ms",
              "Mrs",
              "Miss",
              "Sir",
              "Madam",
              "Dr",
              "Rev"
            ]
          },
          "name": {
            "type": "string",
            "description": "Member full name.",
            "example": "John Doe"
          },
          "firstName": {
            "type": "string",
            "description": "Member first name.",
            "nullable": true,
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Member last name.",
            "nullable": true,
            "example": "Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Member email address. Used for pass delivery emails when a pass is issued.",
            "example": "john@example.com"
          },
          "address": {
            "$ref": "#/components/schemas/MemberAddress"
          },
          "contactPreferences": {
            "$ref": "#/components/schemas/MemberContactPreferences"
          },
          "memberId": {
            "type": "string",
            "description": "External or organisation-defined member identifier.",
            "example": "MEM001"
          },
          "memberSince": {
            "type": "string",
            "format": "date-time",
            "description": "Date the member joined. Defaults to the creation date when omitted.",
            "example": "2024-01-15T00:00:00.000Z"
          },
          "type": {
            "type": "string",
            "description": "Member category. Defaults to Member when omitted.",
            "enum": [
              "Member",
              "Visitor"
            ]
          },
          "status": {
            "type": "string",
            "description": "Member account status. Defaults to active when omitted.",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "location": {
            "type": "string",
            "description": "Member location or branch.",
            "nullable": true,
            "example": "Main Street"
          },
          "phone": {
            "type": "string",
            "description": "Member phone number.",
            "nullable": true,
            "maxLength": 50,
            "example": "+447700900123"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date-time",
            "description": "Member date of birth.",
            "nullable": true,
            "example": "1990-04-20"
          },
          "gender": {
            "type": "string",
            "description": "Member gender.",
            "enum": [
              "male",
              "female",
              "other",
              "prefer_not_to_say"
            ],
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Internal member notes.",
            "nullable": true,
            "maxLength": 5000,
            "example": "Prefers email contact"
          },
          "flagged": {
            "type": "boolean",
            "description": "Whether the member is flagged for staff attention.",
            "default": false
          },
          "flagNote": {
            "type": "string",
            "description": "Optional note shown when the member is flagged.",
            "nullable": true,
            "maxLength": 500,
            "example": "Check eligibility before issuing renewal"
          },
          "customFields": {
            "type": "object",
            "description": "Organisation-defined custom field values keyed by custom field key. Use customFields only for fields configured by the organisation; use first-party fields such as phone, dateOfBirth, gender, and notes at the top level.",
            "example": {
              "membershipLevel": "Gold",
              "favoriteLocation": "Main Street",
              "newsletterOptIn": true
            },
            "additionalProperties": true
          },
          "passes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberPass"
            },
            "description": "Pass wrappers included by member list and lookup endpoints"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "walletSummary": {
            "type": "object",
            "description": "Included on member list responses",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "added": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "no_pass",
                  "added",
                  "not_added"
                ]
              }
            }
          },
          "photo": {
            "type": "string",
            "nullable": true,
            "description": "Stored member photo URL"
          },
          "linkedMemberGroupId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "CreateMemberRequest": {
        "type": "object",
        "required": [
          "name",
          "email"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "Optional member title or honorific.",
            "enum": [
              "Mr",
              "Ms",
              "Mrs",
              "Miss",
              "Sir",
              "Madam",
              "Dr",
              "Rev"
            ]
          },
          "name": {
            "type": "string",
            "description": "Member full name. Required by the public API. firstName and lastName may also be provided and are stored separately.",
            "example": "John Doe",
            "minLength": 1
          },
          "firstName": {
            "type": "string",
            "description": "Optional member first name stored separately from the full name.",
            "maxLength": 120,
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Optional member last name stored separately from the full name.",
            "maxLength": 120,
            "example": "Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Member email address. Used for pass delivery emails when a pass is issued.",
            "example": "john@example.com"
          },
          "address": {
            "$ref": "#/components/schemas/MemberAddress"
          },
          "contactPreferences": {
            "$ref": "#/components/schemas/MemberContactPreferences"
          },
          "memberId": {
            "type": "string",
            "description": "Unique member identifier. Must not contain spaces."
          },
          "memberSince": {
            "type": "string",
            "format": "date-time",
            "description": "Date the member joined. Defaults to now when omitted."
          },
          "type": {
            "type": "string",
            "description": "Member category. Defaults to Member when omitted.",
            "enum": [
              "Member",
              "Visitor"
            ]
          },
          "status": {
            "type": "string",
            "description": "Accepted by route validation, but newly created members are stored as active. Use `PUT /members/{id}` to change status",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "location": {
            "type": "string",
            "description": "Member location or branch.",
            "maxLength": 100,
            "example": "Main Street"
          },
          "phone": {
            "type": "string",
            "description": "Member phone number.",
            "nullable": true,
            "maxLength": 50,
            "example": "+447700900123"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "description": "Member date of birth.",
            "nullable": true,
            "example": "1990-04-20"
          },
          "gender": {
            "type": "string",
            "description": "Member gender.",
            "enum": [
              "male",
              "female",
              "other",
              "prefer_not_to_say"
            ],
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Internal member notes.",
            "nullable": true,
            "maxLength": 5000,
            "example": "Prefers email contact"
          },
          "flagged": {
            "type": "boolean",
            "description": "Whether the member is flagged for staff attention.",
            "default": false
          },
          "flagNote": {
            "type": "string",
            "description": "Optional note shown when the member is flagged.",
            "nullable": true,
            "maxLength": 500,
            "example": "Check eligibility before issuing renewal"
          },
          "customFields": {
            "type": "object",
            "description": "Organisation-defined custom field values keyed by custom field key. Use customFields only for fields configured by the organisation; use first-party fields such as phone, dateOfBirth, gender, and notes at the top level.",
            "example": {
              "membershipLevel": "Gold",
              "favoriteLocation": "Main Street",
              "newsletterOptIn": true
            },
            "additionalProperties": true
          },
          "issuePass": {
            "type": "boolean",
            "description": "Set to true to issue a pass immediately after creating the member."
          },
          "passTemplateId": {
            "type": "string",
            "description": "Required when issuePass is true. Use the id from the List pass templates endpoint.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "description": "Optional pass expiry date used when issuePass is true."
          },
          "photo": {
            "type": "string",
            "nullable": true,
            "description": "Base64 image data URL. On update, an empty string removes the photo and existing URLs leave it unchanged"
          },
          "membershipTypeId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "Optional membership assignment after saving the member"
          },
          "membershipPricingOptionId": {
            "type": "string",
            "description": "Pricing option id within the selected membership type"
          },
          "membershipManualPayment": {
            "$ref": "#/components/schemas/ManualMembershipPayment"
          },
          "expiryDateFieldKey": {
            "type": "string",
            "description": "Visible date custom field used for pass expiry; takes precedence over expiryDate when issuePass is true"
          }
        }
      },
      "UpdateMemberRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Optional member title or honorific.",
            "enum": [
              "Mr",
              "Ms",
              "Mrs",
              "Miss",
              "Sir",
              "Madam",
              "Dr",
              "Rev"
            ]
          },
          "name": {
            "type": "string",
            "description": "Updated member full name.",
            "minLength": 1
          },
          "firstName": {
            "type": "string",
            "description": "Updated member first name.",
            "maxLength": 120
          },
          "lastName": {
            "type": "string",
            "description": "Updated member last name.",
            "maxLength": 120
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Updated member email address."
          },
          "address": {
            "$ref": "#/components/schemas/MemberAddress"
          },
          "contactPreferences": {
            "$ref": "#/components/schemas/MemberContactPreferences"
          },
          "memberId": {
            "type": "string",
            "description": "Unique member identifier. Must not contain spaces."
          },
          "memberSince": {
            "type": "string",
            "format": "date-time",
            "description": "Updated member joined date."
          },
          "type": {
            "type": "string",
            "description": "Updated member category.",
            "enum": [
              "Member",
              "Visitor"
            ]
          },
          "status": {
            "type": "string",
            "description": "Updated member account status.",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "location": {
            "type": "string",
            "description": "Member location or branch.",
            "maxLength": 100,
            "example": "Main Street"
          },
          "phone": {
            "type": "string",
            "description": "Member phone number.",
            "nullable": true,
            "maxLength": 50,
            "example": "+447700900123"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "description": "Member date of birth.",
            "nullable": true,
            "example": "1990-04-20"
          },
          "gender": {
            "type": "string",
            "description": "Member gender.",
            "enum": [
              "male",
              "female",
              "other",
              "prefer_not_to_say"
            ],
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Internal member notes.",
            "nullable": true,
            "maxLength": 5000,
            "example": "Prefers email contact"
          },
          "flagged": {
            "type": "boolean",
            "description": "Whether the member is flagged for staff attention.",
            "default": false
          },
          "flagNote": {
            "type": "string",
            "description": "Optional note shown when the member is flagged.",
            "nullable": true,
            "maxLength": 500,
            "example": "Check eligibility before issuing renewal"
          },
          "customFields": {
            "type": "object",
            "description": "Updated organisation-defined custom field values keyed by custom field key. Use first-party fields such as phone, dateOfBirth, gender, and notes at the top level.",
            "example": {
              "membershipLevel": "Gold",
              "favoriteLocation": "Main Street",
              "newsletterOptIn": true
            },
            "additionalProperties": true
          },
          "photo": {
            "type": "string",
            "nullable": true,
            "description": "Base64 image data URL. On update, an empty string removes the photo and existing URLs leave it unchanged"
          },
          "membershipTypeId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "Optional membership assignment after saving the member"
          },
          "membershipPricingOptionId": {
            "type": "string",
            "description": "Pricing option id within the selected membership type"
          },
          "membershipManualPayment": {
            "$ref": "#/components/schemas/ManualMembershipPayment"
          },
          "deactivateLinkedMembers": {
            "type": "boolean",
            "description": "When changing status to inactive, also deactivate linked active members"
          },
          "statusChangeReason": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string"
              },
              "reasonLabel": {
                "type": "string"
              },
              "comments": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "MemberResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Member"
              }
            }
          }
        ]
      },
      "PassInstance": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "example": "507f1f77bcf86cd799439013"
          },
          "serialNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "expired",
              "void"
            ]
          },
          "member": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/Member"
              }
            ],
            "nullable": true
          },
          "pass": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/PassTemplate"
              }
            ]
          },
          "recipientName": {
            "type": "string"
          },
          "recipientEmail": {
            "type": "string",
            "format": "email"
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "walletUrls": {
            "$ref": "#/components/schemas/WalletUrls"
          },
          "maxUses": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum number of successful scans allowed for an event ticket. Defaults to 1 for tickets issued before multi-use support or when omitted."
          },
          "usesRemaining": {
            "type": "integer",
            "minimum": 0,
            "description": "Remaining successful scans available on an event ticket."
          },
          "redeemedCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of successful event ticket redemptions."
          },
          "lastRedeemedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the latest successful event ticket redemption."
          },
          "passType": {
            "type": "string",
            "enum": [
              "generic",
              "eventTicket",
              "loyalty"
            ]
          },
          "customFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "eventTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "eventName": {
            "type": "string"
          },
          "seatInfo": {
            "$ref": "#/components/schemas/SeatInfo"
          },
          "recipientTitle": {
            "type": "string"
          },
          "voided": {
            "type": "boolean"
          },
          "voidedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isNonMemberTicket": {
            "type": "boolean"
          },
          "currentStamps": {
            "type": "number",
            "minimum": 0
          },
          "lifetimeStampsEarned": {
            "type": "number",
            "minimum": 0
          },
          "lastStampUpdate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "membershipManaged": {
            "type": "boolean",
            "description": "Included within member lookup pass wrappers"
          },
          "memberMembershipId": {
            "type": "string",
            "description": "Managing membership _id, when included in a member lookup pass wrapper"
          }
        },
        "additionalProperties": true
      },
      "IssuePassRequest": {
        "type": "object",
        "required": [
          "passTemplateId"
        ],
        "properties": {
          "memberId": {
            "type": "string",
            "description": "Member id to issue the pass to. Use the member _id returned by member endpoints, not your external memberId. Required for standard member passes.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "passTemplateId": {
            "type": "string",
            "description": "Pass template id to issue. Use the id from the List pass templates endpoint.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "description": "Optional pass expiry date."
          },
          "customFields": {
            "type": "object",
            "description": "Company-level custom field values to store on the issued pass. Unknown custom field keys are rejected.",
            "example": {
              "membershipLevel": "Gold",
              "favoriteLocation": "Main Street",
              "newsletterOptIn": true
            },
            "additionalProperties": true
          },
          "sendEmail": {
            "type": "boolean",
            "default": true,
            "description": "Defaults to true. Set to false to issue the pass without sending the pass email."
          },
          "maxUses": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "Event tickets only. Maximum number of successful scans allowed before the ticket is automatically inactivated. Send as a top-level field, not inside customFields.",
            "maximum": 100
          },
          "eventTime": {
            "type": "string",
            "format": "date-time",
            "description": "Event start time for event ticket templates. Required unless supplied by eventId or customFields.eventDateTime, or the template permits redemption at any time."
          },
          "eventName": {
            "type": "string",
            "description": "Event name for event ticket templates. Required unless supplied by eventId or customFields.eventName.",
            "minLength": 1
          },
          "seatInfo": {
            "description": "Seat details for event ticket passes. For event ticket templates, include values for visible built-in section, row, and seat fields. Gate is optional. Hidden fields can be omitted. Custom-only event ticket templates can omit seatInfo.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SeatInfo"
              }
            ]
          },
          "recipientName": {
            "type": "string",
            "description": "Non-member event ticket recipient name. Use with recipientEmail instead of memberId.",
            "example": "John Doe",
            "minLength": 1
          },
          "recipientEmail": {
            "type": "string",
            "format": "email",
            "description": "Non-member event ticket recipient email. Use with recipientName instead of memberId.",
            "example": "john@example.com"
          },
          "eventId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "Event tickets only. Organisation-owned, non-cancelled event _id. Uses the stored event name and start time and enforces event capacity. Find it through `GET /events` or `GET /event-records/{id}`."
          }
        },
        "oneOf": [
          {
            "required": [
              "memberId"
            ]
          },
          {
            "required": [
              "recipientName",
              "recipientEmail"
            ]
          }
        ],
        "example": {
          "memberId": "507f1f77bcf86cd799439011",
          "passTemplateId": "507f1f77bcf86cd799439012",
          "expiryDate": "2024-12-31T23:59:59.000Z",
          "customFields": {
            "membershipLevel": "Premium"
          },
          "sendEmail": true
        }
      },
      "UpdatePassExpiryRequest": {
        "type": "object",
        "properties": {
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "New pass expiry date. Send null to remove the expiry date."
          }
        }
      },
      "PassInstanceResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/PassInstance"
              }
            }
          }
        ]
      },
      "IssuePassResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "passInstance": {
                    "$ref": "#/components/schemas/PassInstance"
                  },
                  "walletUrls": {
                    "$ref": "#/components/schemas/WalletUrls"
                  },
                  "emailSent": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ]
      },
      "PassTemplate": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "example": "507f1f77bcf86cd799439012"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "generic",
              "eventTicket",
              "loyalty"
            ]
          },
          "approved": {
            "type": "boolean"
          },
          "design": {
            "type": "object",
            "description": "Visual design settings used when rendering Apple Wallet and Google Wallet passes.",
            "properties": {
              "backgroundColor": {
                "type": "string",
                "description": "Primary pass background color.",
                "example": "#0F172A"
              },
              "foregroundColor": {
                "type": "string",
                "description": "Primary text color.",
                "example": "#FFFFFF"
              },
              "labelColor": {
                "type": "string",
                "description": "Label text color.",
                "example": "#CBD5E1"
              },
              "voidedBackgroundColor": {
                "type": "string",
                "description": "Background color shown for voided passes.",
                "example": "#64748B"
              },
              "logoText": {
                "type": "string",
                "description": "Text displayed alongside or instead of a logo where supported.",
                "example": "RemyPass"
              },
              "icon": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Icon image URL used by wallet platforms.",
                "example": "https://cdn.remypass.com/passes/icon.png"
              },
              "appleLogo": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Apple Wallet logo image URL.",
                "example": "https://cdn.remypass.com/passes/apple-logo.png"
              },
              "googleLogo": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Google Wallet logo image URL.",
                "example": "https://cdn.remypass.com/passes/google-logo.png"
              },
              "googleWideLogo": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Google Wallet wide logo image URL, commonly used for loyalty passes.",
                "example": "https://cdn.remypass.com/passes/google-wide-logo.png"
              },
              "heroImage": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Google Wallet hero image URL.",
                "example": "https://cdn.remypass.com/passes/hero.png"
              },
              "stripImage": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Apple Wallet strip image URL, commonly used for event tickets.",
                "example": "https://cdn.remypass.com/passes/strip.png"
              },
              "colorVariants": {
                "type": "array",
                "description": "Optional conditional color variants matched against member, pass, or custom field values.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Variant id.",
                      "example": "gold-members"
                    },
                    "name": {
                      "type": "string",
                      "description": "Variant display name.",
                      "example": "Gold members"
                    },
                    "field": {
                      "type": "string",
                      "description": "Field to match, such as a custom field or member attribute.",
                      "example": "custom_membershipLevel"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "contains",
                        "does_not_contain",
                        "more_than_years",
                        "less_than_years"
                      ],
                      "description": "Comparison to apply. Year-based operators compare the date field with the supplied number of years.",
                      "example": "is"
                    },
                    "value": {
                      "type": "string",
                      "description": "Value that activates the variant.",
                      "example": "Gold"
                    },
                    "colors": {
                      "type": "object",
                      "description": "Colors applied when the variant matches.",
                      "properties": {
                        "backgroundColor": {
                          "type": "string",
                          "description": "Variant background color.",
                          "example": "#F59E0B"
                        },
                        "foregroundColor": {
                          "type": "string",
                          "description": "Variant text color.",
                          "example": "#111827"
                        },
                        "labelColor": {
                          "type": "string",
                          "description": "Variant label color.",
                          "example": "#374151"
                        },
                        "voidedBackgroundColor": {
                          "type": "string",
                          "description": "Variant voided background color.",
                          "example": "#92400E"
                        }
                      }
                    }
                  }
                }
              }
            },
            "additionalProperties": true
          },
          "loyalty": {
            "type": "object",
            "description": "Loyalty pass configuration. Present for loyalty pass templates.",
            "properties": {
              "initialStamps": {
                "type": "integer",
                "minimum": 0,
                "default": 0,
                "description": "Number of stamps a loyalty pass starts with.",
                "example": 0
              },
              "maxStamps": {
                "type": "integer",
                "minimum": 1,
                "maximum": 40,
                "default": 10,
                "description": "Number of stamps required to complete the loyalty card.",
                "example": 10
              },
              "emptyStampIconBgColor": {
                "type": "string",
                "description": "Background color for empty stamp slots.",
                "example": "#FFFFFF"
              },
              "filledStampIcon": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Filled stamp icon image URL.",
                "example": "https://cdn.remypass.com/passes/filled-stamp.png"
              },
              "filledStampIconBgColor": {
                "type": "string",
                "description": "Background color for filled stamp slots.",
                "example": "#007BFF"
              },
              "rewardIcon": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Reward icon image URL.",
                "example": "https://cdn.remypass.com/passes/reward.png"
              },
              "stripBackgroundColor": {
                "type": "string",
                "description": "Background color for the loyalty stamp strip.",
                "example": "#F8F9FA"
              },
              "stripBackgroundImage": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Optional custom strip background image URL.",
                "example": "https://cdn.remypass.com/passes/loyalty-strip.png"
              },
              "stampShape": {
                "type": "string",
                "enum": [
                  "circle",
                  "rounded",
                  "square"
                ],
                "default": "circle",
                "description": "Shape used for stamp slots.",
                "example": "circle"
              },
              "issueRewards": {
                "type": "boolean",
                "default": true,
                "description": "Whether rewards are issued automatically when the card reaches maxStamps.",
                "example": true
              },
              "deactivateOnMaxStamps": {
                "type": "boolean",
                "default": false,
                "description": "Whether the loyalty pass is set inactive after reaching maxStamps.",
                "example": false
              },
              "rewardTitle": {
                "type": "string",
                "maxLength": 100,
                "default": "Reward Earned!",
                "description": "Title used for generated rewards.",
                "example": "Free Coffee"
              },
              "rewardDescription": {
                "type": "string",
                "maxLength": 500,
                "default": "Congratulations! Youve earned a reward.",
                "description": "Description used for generated rewards.",
                "example": "Show this reward to claim your free coffee."
              },
              "stampSingular": {
                "type": "string",
                "maxLength": 50,
                "description": "Singular label for a stamp.",
                "example": "Stamp"
              },
              "stampPlural": {
                "type": "string",
                "maxLength": 50,
                "description": "Plural label for stamps.",
                "example": "Stamps"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "PassTemplateResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/PassTemplate"
              }
            }
          }
        ]
      },
      "EventTicketResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "passInstance": {
                    "$ref": "#/components/schemas/PassInstance"
                  },
                  "walletUrls": {
                    "$ref": "#/components/schemas/WalletUrls"
                  },
                  "emailSent": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ]
      },
      "SeatInfo": {
        "type": "object",
        "properties": {
          "seat": {
            "type": "string",
            "minLength": 1
          },
          "section": {
            "type": "string",
            "minLength": 1
          },
          "row": {
            "type": "string"
          },
          "gate": {
            "type": "string",
            "minLength": 1,
            "description": "Optional event ticket gate"
          }
        }
      },
      "WalletUrls": {
        "type": "object",
        "properties": {
          "apple": {
            "type": "string",
            "format": "uri"
          },
          "google": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "WebhookEvent": {
        "type": "string",
        "enum": [
          "scan.created",
          "member.created",
          "member.updated",
          "member.status_changed",
          "member.deleted",
          "membership.created",
          "membership.updated",
          "membership.activated",
          "membership.renewed",
          "membership.expiring",
          "membership.expired",
          "membership.cancellation_scheduled",
          "membership.cancellation_revoked",
          "membership.cancelled",
          "membership.payment_succeeded",
          "membership.payment_failed",
          "membership.refund_created",
          "membership.refund_succeeded",
          "membership.refund_failed",
          "membership_type.created",
          "membership_type.updated",
          "membership_type.archived",
          "membership_type.deleted",
          "event.created",
          "event.updated",
          "event.published",
          "event.unpublished",
          "event.visibility_changed",
          "event.cancelled",
          "event.deleted",
          "event_registration.created",
          "event_registration.confirmed",
          "event_registration.updated",
          "event_registration.cancelled",
          "event_registration.checked_in",
          "event_order.created",
          "event_order.confirmed",
          "event_order.cancelled",
          "event_order.payment_succeeded",
          "event_order.payment_failed",
          "event_order.refund_created",
          "event_order.refund_succeeded",
          "event_order.refund_failed",
          "donation.created",
          "donation.payment_succeeded",
          "donation.payment_failed",
          "donation.refund_created",
          "donation.refund_succeeded",
          "donation.refund_failed",
          "donation.dispute_opened",
          "donation.dispute_closed",
          "donation_subscription.created",
          "donation_subscription.activated",
          "donation_subscription.updated",
          "donation_subscription.past_due",
          "donation_subscription.cancellation_scheduled",
          "donation_subscription.cancellation_revoked",
          "donation_subscription.cancelled",
          "donation_campaign.created",
          "donation_campaign.updated",
          "donation_campaign.published",
          "donation_campaign.unpublished",
          "donation_campaign.deleted"
        ],
        "description": "Supported webhook event types"
      },
      "WebhookHeaders": {
        "type": "object",
        "maxProperties": 20,
        "additionalProperties": {
          "type": "string",
          "maxLength": 2000
        },
        "writeOnly": true,
        "example": {
          "X-Integration": "crm"
        },
        "description": "Custom headers replace the entire existing map when supplied; send {} to clear. Values cannot contain line breaks. Host, Content-Type, Content-Length, Connection, Transfer-Encoding and X-RemyPass-* names are reserved. Values and signing secrets are never returned by reads"
      },
      "CreateWebhookSubscriptionRequest": {
        "type": "object",
        "required": [
          "name",
          "url",
          "events"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Human-readable subscription name.",
            "example": "Scan Events Webhook"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Optional internal description for this subscription.",
            "example": "Webhook for real-time scan events"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS receiver URL without embedded credentials. No HEAD request is required",
            "example": "https://your-app.com/webhooks/remypass"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "description": "Event types to deliver to this subscription.",
            "maxItems": 63
          },
          "headers": {
            "$ref": "#/components/schemas/WebhookHeaders"
          }
        }
      },
      "UpdateWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Human-readable subscription name."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Optional internal description for this subscription."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS receiver URL without embedded credentials. No HEAD request is required"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "description": "Event types to deliver to this subscription.",
            "maxItems": 63
          },
          "active": {
            "type": "boolean",
            "description": "Whether RemyPass should deliver events to this subscription.",
            "default": true
          },
          "headers": {
            "$ref": "#/components/schemas/WebhookHeaders"
          }
        }
      },
      "WebhookSubscription": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicWebhookSubscription"
          }
        ],
        "description": "Public subscription read shape. The signing secret is returned only by the creation response"
      },
      "WebhookSubscriptionResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/WebhookSubscription"
              }
            }
          }
        ]
      },
      "ScanCreatedWebhookPayload": {
        "type": "object",
        "required": [
          "id",
          "event",
          "timestamp",
          "organisation_id",
          "data",
          "schema_version",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable event ID reused for retries and replay; may be a SHA-256 hash or UUID",
            "example": "evt_example"
          },
          "event": {
            "type": "string",
            "enum": [
              "scan.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z"
          },
          "organisation_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011"
          },
          "schema_version": {
            "type": "string",
            "enum": [
              "1"
            ],
            "example": "1"
          },
          "source": {
            "type": "string",
            "description": "Origin of the event",
            "example": "api"
          },
          "test": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "scan"
            ],
            "properties": {
              "scan": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Scan record id."
                  },
                  "company": {
                    "type": "string",
                    "description": "Company id."
                  },
                  "source": {
                    "type": "string",
                    "description": "Scan source."
                  },
                  "member": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Member id."
                      },
                      "name": {
                        "type": "string",
                        "description": "Member name."
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Member email."
                      },
                      "memberId": {
                        "type": "string",
                        "description": "External member id."
                      }
                    },
                    "nullable": true
                  },
                  "input": {
                    "type": "string",
                    "description": "Scanned input value."
                  },
                  "location": {
                    "type": "string",
                    "description": "Scan location, when provided."
                  },
                  "result": {
                    "type": "string",
                    "description": "Scan result."
                  },
                  "reason": {
                    "type": "string",
                    "description": "Reason associated with the scan result."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scan creation time."
                  }
                }
              }
            }
          }
        }
      },
      "Scan": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "member": {
            "type": "string",
            "nullable": true
          },
          "passInstance": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web",
              "mac",
              "system",
              "square"
            ]
          },
          "location": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "IN",
              "OUT",
              "IGNORED",
              "STAMP_GIVEN",
              "TICKET_REDEEMED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "quantity": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "_id",
          "source",
          "result",
          "type",
          "createdAt",
          "updatedAt"
        ]
      },
      "Membership": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "member": {
            "type": "string"
          },
          "membershipType": {
            "type": "string"
          },
          "passInstance": {
            "type": "string"
          },
          "paymentMode": {
            "type": "string",
            "enum": [
              "one_off",
              "subscription"
            ]
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "past_due",
              "canceled",
              "expired",
              "refunded",
              "failed"
            ],
            "description": "Stored RemyPass membership status, synchronised through payment webhooks; distinct from pass status and live Stripe subscription status"
          },
          "autoRenews": {
            "type": "boolean"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "amount": {
            "type": "integer",
            "description": "Amount in minor currency units"
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "canceledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastPaymentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastPaymentFailedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancellationRequestedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "stripe": {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string",
                "nullable": true
              },
              "customerId": {
                "type": "string",
                "nullable": true
              },
              "subscriptionId": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "paymentRecovery": {
            "type": "object",
            "properties": {
              "actionRequired": {
                "type": "boolean"
              },
              "attemptCount": {
                "type": "integer"
              },
              "nextPaymentAttempt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "gracePeriodEndsAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "name": {
            "type": "string",
            "example": "Example",
            "description": "name"
          },
          "slug": {
            "type": "string",
            "example": "example",
            "description": "slug"
          },
          "description": {
            "type": "string",
            "example": "",
            "description": "description"
          },
          "imageUrl": {
            "type": "string",
            "example": "https://example.com/webhook",
            "description": "image Url"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "starts At"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "ends At"
          },
          "timezone": {
            "type": "string",
            "example": "example",
            "description": "timezone"
          },
          "location": {
            "type": "object",
            "properties": {
              "addressLine1": {
                "type": "string",
                "example": "example",
                "description": "address Line1"
              },
              "addressLine2": {
                "type": "string",
                "example": "example",
                "description": "address Line2"
              },
              "city": {
                "type": "string",
                "example": "example",
                "description": "city"
              },
              "region": {
                "type": "string",
                "example": "example",
                "description": "region"
              },
              "postalCode": {
                "type": "string",
                "example": "example",
                "description": "postal Code"
              },
              "country": {
                "type": "string",
                "example": "example",
                "description": "country"
              },
              "what3words": {
                "type": "string",
                "example": "example",
                "description": "what3words"
              }
            }
          },
          "ticketPrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "example": 0,
                "description": "Money in major currency units"
              },
              "currency": {
                "type": "string",
                "example": "gbp",
                "description": "currency"
              }
            }
          },
          "ticketPricingMode": {
            "type": "string",
            "example": "single",
            "enum": [
              "single",
              "multiple"
            ],
            "description": "ticket Pricing Mode"
          },
          "ticketPricingOptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "example",
                  "description": "id"
                },
                "label": {
                  "type": "string",
                  "example": "example",
                  "description": "label"
                },
                "description": {
                  "type": "string",
                  "example": "example",
                  "description": "description"
                },
                "_id": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$",
                  "example": "507f1f77bcf86cd799439011",
                  "description": "Related RemyPass record _id"
                },
                "price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "example": 0,
                      "description": "Money in major currency units"
                    },
                    "currency": {
                      "type": "string",
                      "example": "gbp",
                      "description": "currency"
                    }
                  }
                }
              }
            },
            "description": "ticket Pricing Options"
          },
          "ticketPolicy": {
            "type": "string",
            "example": "free_required",
            "enum": [
              "free_required",
              "paid_required"
            ],
            "description": "ticket Policy"
          },
          "issueDigitalPass": {
            "type": "boolean",
            "example": true,
            "description": "issue Digital Pass"
          },
          "ticketCapacity": {
            "type": "number",
            "example": 1,
            "nullable": true,
            "description": "ticket Capacity"
          },
          "registrationEndsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "registration Ends At"
          },
          "audience": {
            "type": "string",
            "example": "members",
            "enum": [
              "members",
              "public"
            ],
            "description": "audience"
          },
          "status": {
            "type": "string",
            "example": "draft",
            "enum": [
              "draft",
              "published",
              "unlisted",
              "cancelled"
            ],
            "description": "status"
          }
        }
      },
      "EventRegistration": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "event": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "order": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "registrantIndex": {
            "type": "number",
            "example": 0,
            "description": "registrant Index"
          },
          "role": {
            "type": "string",
            "example": "buyer",
            "enum": [
              "buyer",
              "guest"
            ],
            "description": "role"
          },
          "registrant": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Example",
                "description": "name"
              },
              "email": {
                "type": "string",
                "example": "person@example.com",
                "description": "email"
              },
              "memberId": {
                "type": "string",
                "example": "example",
                "description": "member Id"
              },
              "membershipVerificationStatus": {
                "type": "string",
                "example": "unverified",
                "enum": [
                  "unverified",
                  "verified",
                  "not_a_member"
                ],
                "description": "membership Verification Status"
              }
            }
          },
          "deliveryEmail": {
            "type": "string",
            "example": "person@example.com",
            "description": "delivery Email"
          },
          "ticketPassInstance": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Example",
                "description": "name"
              },
              "email": {
                "type": "string",
                "example": "person@example.com",
                "description": "email"
              }
            }
          },
          "status": {
            "type": "string",
            "example": "active",
            "enum": [
              "pending",
              "active",
              "cancelled"
            ],
            "description": "status"
          },
          "paymentStatus": {
            "type": "string",
            "example": "free",
            "enum": [
              "free",
              "paid",
              "pending",
              "refund_pending",
              "refund_failed",
              "refunded",
              "disputed"
            ],
            "description": "payment Status"
          },
          "amountPaid": {
            "type": "number",
            "example": 0,
            "description": "Money in major currency units"
          },
          "currency": {
            "type": "string",
            "example": "gbp",
            "description": "currency"
          },
          "purchaseProtectionSelected": {
            "type": "boolean",
            "example": false,
            "description": "purchase Protection Selected"
          },
          "purchaseProtectionAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in major currency units"
          },
          "addOnsAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in major currency units"
          },
          "formSubmission": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "reservationExpiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "reservation Expires At"
          }
        }
      },
      "EventOrder": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "event": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "active",
              "cancelled"
            ],
            "description": "status"
          },
          "paymentStatus": {
            "type": "string",
            "example": "pending",
            "enum": [
              "free",
              "paid",
              "pending",
              "refund_pending",
              "refund_failed",
              "refunded",
              "partially_refunded",
              "disputed"
            ],
            "description": "payment Status"
          },
          "fulfillmentStatus": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "processing",
              "fulfilled",
              "failed",
              "refund_pending",
              "refunded"
            ],
            "description": "fulfillment Status"
          },
          "amountPaid": {
            "type": "number",
            "example": 0,
            "description": "Money in major currency units"
          },
          "refundedAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in major currency units"
          },
          "currency": {
            "type": "string",
            "example": "gbp",
            "description": "currency"
          },
          "deliveryMode": {
            "type": "string",
            "example": "buyer_only",
            "enum": [
              "buyer_only",
              "individual_recipients"
            ],
            "description": "delivery Mode"
          },
          "ticketMode": {
            "type": "string",
            "example": "named",
            "enum": [
              "named",
              "generic"
            ],
            "description": "ticket Mode"
          },
          "registrantCount": {
            "type": "number",
            "example": 1,
            "description": "registrant Count"
          },
          "reservationExpiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "reservation Expires At"
          },
          "fulfillmentCompletedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "fulfillment Completed At"
          }
        }
      },
      "Donation": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "campaign": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "subscription": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "donor": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Example",
                "description": "name"
              },
              "email": {
                "type": "string",
                "example": "person@example.com",
                "description": "email"
              }
            }
          },
          "frequency": {
            "type": "string",
            "example": "one_off",
            "enum": [
              "one_off",
              "monthly"
            ],
            "description": "frequency"
          },
          "baseAmount": {
            "type": "number",
            "example": 25,
            "description": "Money in minor currency units"
          },
          "feeContributionAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in minor currency units"
          },
          "amount": {
            "type": "number",
            "example": 25,
            "description": "Money in minor currency units"
          },
          "currency": {
            "type": "string",
            "example": "gbp",
            "description": "currency"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "paid",
              "failed",
              "refund_pending",
              "partially_refunded",
              "refunded",
              "disputed",
              "dispute_lost"
            ],
            "description": "status"
          },
          "anonymous": {
            "type": "boolean",
            "example": false,
            "description": "Anonymity applies to public displays; authorised organisation API access includes donor name and email"
          },
          "refundedAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in minor currency units"
          },
          "disputeStatus": {
            "type": "string",
            "example": "open",
            "enum": [
              "open",
              "won",
              "lost",
              "warning_closed"
            ],
            "description": "dispute Status"
          },
          "disputedAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in minor currency units"
          },
          "receiptUrl": {
            "type": "string",
            "example": "",
            "description": "receipt Url"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "paid At"
          },
          "refundedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "refunded At"
          }
        }
      },
      "DonationSubscription": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "campaign": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id",
            "nullable": true
          },
          "donor": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Example",
                "description": "name"
              },
              "email": {
                "type": "string",
                "example": "person@example.com",
                "description": "email"
              }
            }
          },
          "baseAmount": {
            "type": "number",
            "example": 25,
            "description": "Money in minor currency units"
          },
          "feeContributionAmount": {
            "type": "number",
            "example": 0,
            "description": "Money in minor currency units"
          },
          "amount": {
            "type": "number",
            "example": 25,
            "description": "Money in minor currency units"
          },
          "currency": {
            "type": "string",
            "example": "gbp",
            "description": "currency"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "active",
              "past_due",
              "cancelled"
            ],
            "description": "status"
          },
          "anonymous": {
            "type": "boolean",
            "example": false,
            "description": "Anonymity applies to public displays; authorised organisation API access includes donor name and email"
          },
          "coverFees": {
            "type": "boolean",
            "example": false,
            "description": "cover Fees"
          },
          "feeContributionPercent": {
            "type": "number",
            "example": 0,
            "description": "fee Contribution Percent"
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "current Period End"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean",
            "example": false,
            "description": "cancel At Period End"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "cancelled At"
          },
          "pendingAmountChange": {
            "type": "object",
            "properties": {
              "baseAmount": {
                "type": "number",
                "example": 25,
                "description": "Money in minor currency units"
              },
              "feeContributionAmount": {
                "type": "number",
                "example": 25,
                "description": "Money in minor currency units"
              },
              "amount": {
                "type": "number",
                "example": 25,
                "description": "Money in minor currency units"
              },
              "requestedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2026-10-06T12:00:00.000Z",
                "description": "requested At"
              }
            }
          },
          "pendingCancellationRequestedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "nullable": true,
            "description": "pending Cancellation Requested At"
          }
        }
      },
      "DonationCampaign": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "title": {
            "type": "string",
            "example": "Example",
            "description": "title"
          },
          "slug": {
            "type": "string",
            "example": "example",
            "description": "slug"
          },
          "description": {
            "type": "string",
            "example": "",
            "description": "description"
          },
          "imageUrl": {
            "type": "string",
            "example": "",
            "description": "image Url"
          },
          "logoUrl": {
            "type": "string",
            "example": "",
            "description": "logo Url"
          },
          "status": {
            "type": "string",
            "example": "draft",
            "enum": [
              "draft",
              "published",
              "archived"
            ],
            "description": "status"
          },
          "currency": {
            "type": "string",
            "example": "usd",
            "description": "currency"
          },
          "suggestedAmounts": {
            "type": "array",
            "items": {
              "type": "number",
              "example": 25
            },
            "description": "Money in minor currency units"
          },
          "defaultAmount": {
            "type": "number",
            "example": 2500,
            "description": "Money in minor currency units"
          },
          "allowCustomAmount": {
            "type": "boolean",
            "example": true,
            "description": "allow Custom Amount"
          },
          "minimumAmount": {
            "type": "number",
            "example": 100,
            "description": "Money in minor currency units"
          },
          "maximumCustomAmount": {
            "type": "number",
            "example": 25,
            "nullable": true,
            "description": "Money in minor currency units"
          },
          "allowRecurring": {
            "type": "boolean",
            "example": true,
            "description": "allow Recurring"
          },
          "promoteMonthlyGiving": {
            "type": "boolean",
            "example": false,
            "description": "promote Monthly Giving"
          },
          "defaultFrequency": {
            "type": "string",
            "example": "one_off",
            "enum": [
              "one_off",
              "monthly"
            ],
            "description": "default Frequency"
          },
          "feeContributionEnabled": {
            "type": "boolean",
            "example": false,
            "description": "fee Contribution Enabled"
          },
          "feeContributionPercent": {
            "type": "number",
            "example": 3,
            "description": "fee Contribution Percent"
          },
          "goalAmount": {
            "type": "number",
            "example": 25,
            "nullable": true,
            "description": "Money in minor currency units"
          },
          "acknowledgementText": {
            "type": "string",
            "example": "No goods or services were provided in exchange for this contribution",
            "description": "acknowledgement Text"
          },
          "confirmationText": {
            "type": "string",
            "example": "Thank you for supporting our work",
            "description": "confirmation Text"
          },
          "totalRaised": {
            "type": "number",
            "example": 0,
            "description": "Stored campaign total in minor currency units"
          },
          "donationCount": {
            "type": "number",
            "example": 0,
            "description": "Stored campaign donation count"
          }
        }
      },
      "MembershipType": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          },
          "name": {
            "type": "string",
            "example": "Example",
            "description": "name"
          },
          "description": {
            "type": "string",
            "example": "example",
            "description": "description"
          },
          "benefits": {
            "type": "string",
            "example": "example",
            "description": "benefits"
          },
          "active": {
            "type": "boolean",
            "example": true,
            "description": "active"
          },
          "group": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "sortOrder": {
            "type": "number",
            "example": 0,
            "description": "sort Order"
          },
          "price": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "example": 25,
                "description": "Money in minor currency units"
              },
              "currency": {
                "type": "string",
                "example": "gbp",
                "description": "currency"
              }
            }
          },
          "expiration": {
            "type": "object",
            "properties": {
              "interval": {
                "type": "string",
                "example": "year",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year",
                  "lifetime",
                  "custom"
                ],
                "description": "interval"
              },
              "intervalCount": {
                "type": "number",
                "example": 1,
                "description": "interval Count"
              },
              "customInterval": {
                "type": "string",
                "example": "day",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "description": "custom Interval"
              }
            }
          },
          "expiryPolicy": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "example": "rolling",
                "enum": [
                  "rolling",
                  "scheduled"
                ],
                "description": "mode"
              },
              "timeZone": {
                "type": "string",
                "example": "example",
                "description": "time Zone"
              },
              "rules": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "example",
                      "description": "label"
                    },
                    "transactionStart": {
                      "type": "string",
                      "example": "example",
                      "description": "transaction Start"
                    },
                    "transactionEnd": {
                      "type": "string",
                      "example": "example",
                      "description": "transaction End"
                    },
                    "expiryMonthDay": {
                      "type": "string",
                      "example": "example",
                      "description": "expiry Month Day"
                    }
                  }
                },
                "description": "rules"
              }
            }
          },
          "introductoryOffer": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "example": false,
                "description": "enabled"
              },
              "audience": {
                "type": "string",
                "example": "new_members_only",
                "enum": [
                  "new_members_only"
                ],
                "description": "audience"
              },
              "type": {
                "type": "string",
                "example": "free_first_period",
                "enum": [
                  "free_first_period"
                ],
                "description": "type"
              }
            }
          },
          "pricingOptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "optionId": {
                  "type": "string",
                  "example": "example",
                  "description": "option Id"
                },
                "label": {
                  "type": "string",
                  "example": "example",
                  "description": "label"
                },
                "automaticRenewal": {
                  "type": "string",
                  "example": "none",
                  "enum": [
                    "required",
                    "none"
                  ],
                  "description": "automatic Renewal"
                },
                "minimumTermCycles": {
                  "type": "number",
                  "example": 1,
                  "description": "minimum Term Cycles"
                },
                "_id": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$",
                  "example": "507f1f77bcf86cd799439011",
                  "description": "Related RemyPass record _id"
                },
                "price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "example": 25,
                      "description": "Money in minor currency units"
                    },
                    "currency": {
                      "type": "string",
                      "example": "gbp",
                      "description": "currency"
                    }
                  }
                },
                "expiration": {
                  "type": "object",
                  "properties": {
                    "interval": {
                      "type": "string",
                      "example": "year",
                      "enum": [
                        "day",
                        "week",
                        "month",
                        "year",
                        "lifetime",
                        "custom"
                      ],
                      "description": "interval"
                    },
                    "intervalCount": {
                      "type": "number",
                      "example": 1,
                      "description": "interval Count"
                    },
                    "customInterval": {
                      "type": "string",
                      "example": "day",
                      "enum": [
                        "day",
                        "week",
                        "month",
                        "year"
                      ],
                      "description": "custom Interval"
                    }
                  }
                },
                "introductoryOffer": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "example": false,
                      "description": "enabled"
                    },
                    "requiresAdminReview": {
                      "type": "boolean",
                      "example": false,
                      "description": "requires Admin Review"
                    },
                    "audience": {
                      "type": "string",
                      "example": "new_members_only",
                      "enum": [
                        "new_members_only"
                      ],
                      "description": "audience"
                    },
                    "type": {
                      "type": "string",
                      "example": "free_first_period",
                      "enum": [
                        "free_first_period"
                      ],
                      "description": "type"
                    }
                  }
                }
              }
            },
            "description": "pricing Options"
          },
          "pass": {
            "type": "object",
            "properties": {
              "issueOnPurchase": {
                "type": "boolean",
                "example": true,
                "description": "issue On Purchase"
              },
              "template": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$",
                "example": "507f1f77bcf86cd799439011",
                "description": "Related RemyPass record _id"
              },
              "sendEmail": {
                "type": "boolean",
                "example": true,
                "description": "send Email"
              }
            }
          },
          "lifecycle": {
            "type": "object",
            "properties": {
              "cancellationAction": {
                "type": "string",
                "example": "deactivate",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ],
                "description": "cancellation Action"
              },
              "refundAction": {
                "type": "string",
                "example": "revoke",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ],
                "description": "refund Action"
              },
              "paymentFailureAction": {
                "type": "string",
                "example": "do_nothing",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ],
                "description": "payment Failure Action"
              },
              "gracePeriodDays": {
                "type": "number",
                "example": 7,
                "description": "grace Period Days"
              }
            }
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "subscription": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "Related RemyPass record _id"
          },
          "eventId": {
            "type": "string",
            "example": "example",
            "description": "event Id"
          },
          "event": {
            "type": "string",
            "example": "example",
            "description": "event"
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookPayload"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "processing",
              "success",
              "failed",
              "cancelled"
            ],
            "description": "status"
          },
          "attempts": {
            "type": "number",
            "example": 0,
            "description": "attempts"
          },
          "replayCount": {
            "type": "number",
            "example": 0,
            "description": "replay Count"
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "next Attempt At"
          },
          "statusCode": {
            "type": "number",
            "example": 1,
            "description": "status Code"
          },
          "errorMessage": {
            "type": "string",
            "example": "example",
            "description": "error Message"
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "delivered At"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "expires At"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          }
        }
      },
      "WebhookPayload": {
        "type": "object",
        "required": [
          "id",
          "event",
          "timestamp",
          "organisation_id",
          "data",
          "schema_version",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable event ID reused for retries and replay; may be a SHA-256 hash or UUID",
            "example": "evt_example"
          },
          "event": {
            "type": "string",
            "enum": [
              "scan.created",
              "member.created",
              "member.updated",
              "member.status_changed",
              "member.deleted",
              "membership.created",
              "membership.updated",
              "membership.activated",
              "membership.renewed",
              "membership.expiring",
              "membership.expired",
              "membership.cancellation_scheduled",
              "membership.cancellation_revoked",
              "membership.cancelled",
              "membership.payment_succeeded",
              "membership.payment_failed",
              "membership.refund_created",
              "membership.refund_succeeded",
              "membership.refund_failed",
              "membership_type.created",
              "membership_type.updated",
              "membership_type.archived",
              "membership_type.deleted",
              "event.created",
              "event.updated",
              "event.published",
              "event.unpublished",
              "event.visibility_changed",
              "event.cancelled",
              "event.deleted",
              "event_registration.created",
              "event_registration.confirmed",
              "event_registration.updated",
              "event_registration.cancelled",
              "event_registration.checked_in",
              "event_order.created",
              "event_order.confirmed",
              "event_order.cancelled",
              "event_order.payment_succeeded",
              "event_order.payment_failed",
              "event_order.refund_created",
              "event_order.refund_succeeded",
              "event_order.refund_failed",
              "donation.created",
              "donation.payment_succeeded",
              "donation.payment_failed",
              "donation.refund_created",
              "donation.refund_succeeded",
              "donation.refund_failed",
              "donation.dispute_opened",
              "donation.dispute_closed",
              "donation_subscription.created",
              "donation_subscription.activated",
              "donation_subscription.updated",
              "donation_subscription.past_due",
              "donation_subscription.cancellation_scheduled",
              "donation_subscription.cancellation_revoked",
              "donation_subscription.cancelled",
              "donation_campaign.created",
              "donation_campaign.updated",
              "donation_campaign.published",
              "donation_campaign.unpublished",
              "donation_campaign.deleted"
            ],
            "example": "member.created"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z"
          },
          "organisation_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011"
          },
          "schema_version": {
            "type": "string",
            "enum": [
              "1"
            ],
            "example": "1"
          },
          "source": {
            "type": "string",
            "description": "Origin of the event",
            "example": "api"
          },
          "test": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Event-specific data; consult the catalogue samples",
            "example": {
              "member": {
                "id": "507f1f77bcf86cd799439011",
                "company": "507f1f77bcf86cd799439010",
                "memberId": "MEM001",
                "name": "Example Member",
                "email": "member@example.com",
                "status": "active"
              }
            }
          }
        }
      },
      "CreateWebhookSubscription": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "CRM sync",
            "description": "Subscription name"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "example": "Synchronise member changes"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks/remypass",
            "description": "HTTPS receiver URL without embedded credentials"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "maxItems": 63,
            "items": {
              "type": "string",
              "enum": [
                "scan.created",
                "member.created",
                "member.updated",
                "member.status_changed",
                "member.deleted",
                "membership.created",
                "membership.updated",
                "membership.activated",
                "membership.renewed",
                "membership.expiring",
                "membership.expired",
                "membership.cancellation_scheduled",
                "membership.cancellation_revoked",
                "membership.cancelled",
                "membership.payment_succeeded",
                "membership.payment_failed",
                "membership.refund_created",
                "membership.refund_succeeded",
                "membership.refund_failed",
                "membership_type.created",
                "membership_type.updated",
                "membership_type.archived",
                "membership_type.deleted",
                "event.created",
                "event.updated",
                "event.published",
                "event.unpublished",
                "event.visibility_changed",
                "event.cancelled",
                "event.deleted",
                "event_registration.created",
                "event_registration.confirmed",
                "event_registration.updated",
                "event_registration.cancelled",
                "event_registration.checked_in",
                "event_order.created",
                "event_order.confirmed",
                "event_order.cancelled",
                "event_order.payment_succeeded",
                "event_order.payment_failed",
                "event_order.refund_created",
                "event_order.refund_succeeded",
                "event_order.refund_failed",
                "donation.created",
                "donation.payment_succeeded",
                "donation.payment_failed",
                "donation.refund_created",
                "donation.refund_succeeded",
                "donation.refund_failed",
                "donation.dispute_opened",
                "donation.dispute_closed",
                "donation_subscription.created",
                "donation_subscription.activated",
                "donation_subscription.updated",
                "donation_subscription.past_due",
                "donation_subscription.cancellation_scheduled",
                "donation_subscription.cancellation_revoked",
                "donation_subscription.cancelled",
                "donation_campaign.created",
                "donation_campaign.updated",
                "donation_campaign.published",
                "donation_campaign.unpublished",
                "donation_campaign.deleted"
              ],
              "example": "member.created"
            },
            "example": [
              "member.created",
              "member.updated"
            ],
            "description": "Non-empty event selection; duplicates are removed"
          },
          "headers": {
            "type": "object",
            "maxProperties": 20,
            "additionalProperties": {
              "type": "string",
              "maxLength": 2000
            },
            "writeOnly": true,
            "example": {
              "X-Integration": "crm"
            },
            "description": "Custom headers replace the entire existing map when supplied; send {} to clear. Values cannot contain line breaks. Host, Content-Type, Content-Length, Connection, Transfer-Encoding and X-RemyPass-* names are reserved. Values and signing secrets are never returned by reads"
          }
        },
        "required": [
          "name",
          "url",
          "events"
        ]
      },
      "UpdateWebhookSubscription": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "CRM sync",
            "description": "Subscription name"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "example": "Synchronise member changes"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks/remypass",
            "description": "HTTPS receiver URL without embedded credentials"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "maxItems": 63,
            "items": {
              "type": "string",
              "enum": [
                "scan.created",
                "member.created",
                "member.updated",
                "member.status_changed",
                "member.deleted",
                "membership.created",
                "membership.updated",
                "membership.activated",
                "membership.renewed",
                "membership.expiring",
                "membership.expired",
                "membership.cancellation_scheduled",
                "membership.cancellation_revoked",
                "membership.cancelled",
                "membership.payment_succeeded",
                "membership.payment_failed",
                "membership.refund_created",
                "membership.refund_succeeded",
                "membership.refund_failed",
                "membership_type.created",
                "membership_type.updated",
                "membership_type.archived",
                "membership_type.deleted",
                "event.created",
                "event.updated",
                "event.published",
                "event.unpublished",
                "event.visibility_changed",
                "event.cancelled",
                "event.deleted",
                "event_registration.created",
                "event_registration.confirmed",
                "event_registration.updated",
                "event_registration.cancelled",
                "event_registration.checked_in",
                "event_order.created",
                "event_order.confirmed",
                "event_order.cancelled",
                "event_order.payment_succeeded",
                "event_order.payment_failed",
                "event_order.refund_created",
                "event_order.refund_succeeded",
                "event_order.refund_failed",
                "donation.created",
                "donation.payment_succeeded",
                "donation.payment_failed",
                "donation.refund_created",
                "donation.refund_succeeded",
                "donation.refund_failed",
                "donation.dispute_opened",
                "donation.dispute_closed",
                "donation_subscription.created",
                "donation_subscription.activated",
                "donation_subscription.updated",
                "donation_subscription.past_due",
                "donation_subscription.cancellation_scheduled",
                "donation_subscription.cancellation_revoked",
                "donation_subscription.cancelled",
                "donation_campaign.created",
                "donation_campaign.updated",
                "donation_campaign.published",
                "donation_campaign.unpublished",
                "donation_campaign.deleted"
              ],
              "example": "member.created"
            },
            "example": [
              "member.created",
              "member.updated"
            ],
            "description": "Non-empty event selection; duplicates are removed"
          },
          "headers": {
            "type": "object",
            "maxProperties": 20,
            "additionalProperties": {
              "type": "string",
              "maxLength": 2000
            },
            "writeOnly": true,
            "example": {
              "X-Integration": "crm"
            },
            "description": "Custom headers replace the entire existing map when supplied; send {} to clear. Values cannot contain line breaks. Host, Content-Type, Content-Length, Connection, Transfer-Encoding and X-RemyPass-* names are reserved. Values and signing secrets are never returned by reads"
          },
          "active": {
            "type": "boolean",
            "example": true,
            "description": "Enable or disable delivery"
          }
        }
      },
      "PublicWebhookSubscription": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "507f1f77bcf86cd799439011",
            "description": "RemyPass record _id"
          },
          "name": {
            "type": "string",
            "example": "Example",
            "description": "name"
          },
          "description": {
            "type": "string",
            "example": "example",
            "description": "description"
          },
          "url": {
            "type": "string",
            "example": "https://example.com/webhook",
            "description": "url"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "scan.created",
                "member.created",
                "member.updated",
                "member.status_changed",
                "member.deleted",
                "membership.created",
                "membership.updated",
                "membership.activated",
                "membership.renewed",
                "membership.expiring",
                "membership.expired",
                "membership.cancellation_scheduled",
                "membership.cancellation_revoked",
                "membership.cancelled",
                "membership.payment_succeeded",
                "membership.payment_failed",
                "membership.refund_created",
                "membership.refund_succeeded",
                "membership.refund_failed",
                "membership_type.created",
                "membership_type.updated",
                "membership_type.archived",
                "membership_type.deleted",
                "event.created",
                "event.updated",
                "event.published",
                "event.unpublished",
                "event.visibility_changed",
                "event.cancelled",
                "event.deleted",
                "event_registration.created",
                "event_registration.confirmed",
                "event_registration.updated",
                "event_registration.cancelled",
                "event_registration.checked_in",
                "event_order.created",
                "event_order.confirmed",
                "event_order.cancelled",
                "event_order.payment_succeeded",
                "event_order.payment_failed",
                "event_order.refund_created",
                "event_order.refund_succeeded",
                "event_order.refund_failed",
                "donation.created",
                "donation.payment_succeeded",
                "donation.payment_failed",
                "donation.refund_created",
                "donation.refund_succeeded",
                "donation.refund_failed",
                "donation.dispute_opened",
                "donation.dispute_closed",
                "donation_subscription.created",
                "donation_subscription.activated",
                "donation_subscription.updated",
                "donation_subscription.past_due",
                "donation_subscription.cancellation_scheduled",
                "donation_subscription.cancellation_revoked",
                "donation_subscription.cancelled",
                "donation_campaign.created",
                "donation_campaign.updated",
                "donation_campaign.published",
                "donation_campaign.unpublished",
                "donation_campaign.deleted"
              ]
            },
            "description": "events"
          },
          "active": {
            "type": "boolean",
            "example": true,
            "description": "active"
          },
          "lastDeliveryAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "last Delivery At"
          },
          "lastSuccessfulDeliveryAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "last Successful Delivery At"
          },
          "failureCount": {
            "type": "number",
            "example": 0,
            "description": "failure Count"
          },
          "maxRetries": {
            "type": "number",
            "example": 3,
            "description": "max Retries"
          },
          "retryDelaySeconds": {
            "type": "number",
            "example": 60,
            "description": "retry Delay Seconds"
          },
          "timeoutSeconds": {
            "type": "number",
            "example": 30,
            "description": "timeout Seconds"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "created At"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-06T12:00:00.000Z",
            "description": "updated At"
          }
        }
      },
      "MemberPass": {
        "type": "object",
        "properties": {
          "passInstance": {
            "$ref": "#/components/schemas/PassInstance"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "issuedBy": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              },
              {
                "type": "object",
                "properties": {
                  "_id": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            ],
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "expired",
              "void"
            ]
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "CreateMemberResponse": {
        "type": "object",
        "required": [
          "success",
          "message",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "required": [
              "member",
              "passInstance",
              "passIssued",
              "membershipGranted",
              "membershipGrantFailed"
            ],
            "properties": {
              "member": {
                "$ref": "#/components/schemas/Member"
              },
              "passInstance": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PassInstance"
                  }
                ],
                "nullable": true
              },
              "passIssued": {
                "type": "boolean"
              },
              "membershipGrant": {
                "type": "object",
                "nullable": true,
                "additionalProperties": true,
                "description": "Membership assignment result, when requested"
              },
              "membershipGranted": {
                "type": "boolean"
              },
              "membershipGrantFailed": {
                "type": "boolean"
              },
              "membershipGrantError": {
                "type": "string",
                "nullable": true
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "PassMutationResponse": {
        "type": "object",
        "required": [
          "success",
          "message",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "passInstance": {
                "$ref": "#/components/schemas/PassInstance"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "ManualMembershipPayment": {
        "type": "object",
        "required": [
          "method",
          "amount"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "cash",
              "cheque",
              "bank_transfer",
              "card_present",
              "other"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 1,
            "description": "Minor currency units; rounded to an integer"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$",
            "default": "gbp"
          },
          "reference": {
            "type": "string",
            "description": "Trimmed and truncated to 120 characters"
          },
          "notes": {
            "type": "string",
            "description": "Trimmed and truncated to 500 characters"
          }
        }
      },
      "WebhookMemberSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "memberId": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "enum": [
              "Mr",
              "Ms",
              "Mrs",
              "Miss",
              "Sir",
              "Madam",
              "Dr",
              "Rev"
            ]
          },
          "name": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "address": {
            "type": "object",
            "properties": {
              "addressLine1": {
                "type": "string"
              },
              "addressLine2": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "contactPreferences": {
            "type": "object",
            "properties": {
              "email": {
                "type": "boolean"
              },
              "post": {
                "type": "boolean"
              },
              "phone": {
                "type": "boolean"
              }
            }
          },
          "notificationPreferences": {
            "type": "object",
            "additionalProperties": true
          },
          "privacySettings": {
            "type": "object",
            "properties": {
              "showInMemberDirectory": {
                "type": "boolean"
              },
              "showProfileToMembers": {
                "type": "boolean"
              },
              "allowConnectionRequests": {
                "type": "boolean"
              },
              "allowFollowers": {
                "type": "boolean"
              },
              "allowGroupInvites": {
                "type": "boolean"
              },
              "allowMentions": {
                "type": "boolean"
              },
              "showActivityOnProfile": {
                "type": "boolean"
              },
              "showPhotosOnProfile": {
                "type": "boolean"
              },
              "showConnectionsOnProfile": {
                "type": "boolean"
              },
              "showGroupsOnProfile": {
                "type": "boolean"
              }
            }
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "Member",
              "Visitor",
              "Admin"
            ]
          },
          "memberSince": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "type": "string"
          },
          "flagged": {
            "type": "boolean"
          },
          "photo": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          }
        },
        "description": "Webhook snapshot of member. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookMembershipSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "membershipType": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "passInstance": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "past_due",
              "canceled",
              "expired",
              "refunded",
              "failed"
            ]
          },
          "paymentMode": {
            "type": "string",
            "enum": [
              "one_off",
              "subscription"
            ]
          },
          "autoRenews": {
            "type": "boolean"
          },
          "amount": {
            "type": "number"
          },
          "originalAmount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "buyer": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "address": {
                "type": "object",
                "properties": {
                  "addressLine1": {
                    "type": "string"
                  },
                  "addressLine2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "contactPreferences": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "boolean"
                  },
                  "post": {
                    "type": "boolean"
                  },
                  "phone": {
                    "type": "boolean"
                  }
                }
              },
              "customFields": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "pricingOption": {
            "type": "object",
            "properties": {
              "optionId": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "automaticRenewal": {
                "type": "string",
                "enum": [
                  "required",
                  "none"
                ]
              },
              "minimumTermCycles": {
                "type": "number"
              },
              "price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                }
              },
              "expiration": {
                "type": "object",
                "properties": {
                  "interval": {
                    "type": "string"
                  },
                  "intervalCount": {
                    "type": "number"
                  },
                  "customInterval": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "expiryPolicy": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string"
              },
              "timeZone": {
                "type": "string"
              },
              "rules": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "transactionStart": {
                    "type": "string"
                  },
                  "transactionEnd": {
                    "type": "string"
                  },
                  "expiryMonthDay": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "canceledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastPaymentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastPaymentFailedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "failureReason": {
            "type": "string"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "refundedAmount": {
            "type": "number",
            "description": "Minor currency units"
          }
        },
        "description": "Webhook snapshot of membership. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookMembershipTypeSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "benefits": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "group": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "sortOrder": {
            "type": "number"
          },
          "price": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              }
            }
          },
          "introductoryOffer": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "audience": {
                "type": "string",
                "enum": [
                  "new_members_only"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "free_first_period"
                ]
              }
            }
          },
          "pricingOptions": {
            "type": "object",
            "properties": {
              "optionId": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                }
              },
              "expiration": {
                "type": "object",
                "properties": {
                  "interval": {
                    "type": "string",
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year",
                      "lifetime",
                      "custom"
                    ]
                  },
                  "intervalCount": {
                    "type": "number"
                  },
                  "customInterval": {
                    "type": "string",
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year"
                    ]
                  }
                }
              },
              "automaticRenewal": {
                "type": "string",
                "enum": [
                  "required",
                  "none"
                ]
              },
              "minimumTermCycles": {
                "type": "number"
              },
              "introductoryOffer": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "requiresAdminReview": {
                    "type": "boolean"
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "new_members_only"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "free_first_period"
                    ]
                  }
                }
              },
              "_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          },
          "expiration": {
            "type": "object",
            "properties": {
              "interval": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year",
                  "lifetime",
                  "custom"
                ]
              },
              "intervalCount": {
                "type": "number"
              },
              "customInterval": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ]
              }
            }
          },
          "expiryPolicy": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "rolling",
                  "scheduled"
                ]
              },
              "timeZone": {
                "type": "string"
              },
              "rules": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "transactionStart": {
                    "type": "string"
                  },
                  "transactionEnd": {
                    "type": "string"
                  },
                  "expiryMonthDay": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "pass": {
            "type": "object",
            "properties": {
              "issueOnPurchase": {
                "type": "boolean"
              },
              "template": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              },
              "sendEmail": {
                "type": "boolean"
              }
            }
          },
          "purchaseForm": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "form": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          },
          "personalDetailsFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addOnOffers": {
            "type": "object",
            "properties": {
              "product": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              },
              "maxQuantity": {
                "type": "number"
              },
              "billingMode": {
                "type": "string",
                "enum": [
                  "one_off",
                  "recurring"
                ]
              },
              "pricing": {
                "type": "object",
                "properties": {
                  "pricingOptionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      }
                    }
                  },
                  "allowedCountryCodes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "lifecycle": {
            "type": "object",
            "properties": {
              "cancellationAction": {
                "type": "string",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ]
              },
              "refundAction": {
                "type": "string",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ]
              },
              "paymentFailureAction": {
                "type": "string",
                "enum": [
                  "do_nothing",
                  "deactivate",
                  "expire",
                  "revoke"
                ]
              },
              "gracePeriodDays": {
                "type": "number"
              }
            }
          }
        },
        "description": "Webhook snapshot of membership_type. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookEventSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "unlisted",
              "cancelled"
            ]
          },
          "audience": {
            "type": "string",
            "enum": [
              "members",
              "public"
            ]
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "volunteeringStartsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "volunteeringEndsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "addressLine1": {
                "type": "string"
              },
              "addressLine2": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "what3words": {
                "type": "string"
              }
            }
          },
          "registrationEndsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ticketPrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Minor currency units in webhook snapshots; REST reads use major units"
              },
              "currency": {
                "type": "string"
              }
            }
          },
          "ticketPricingMode": {
            "type": "string",
            "enum": [
              "single",
              "multiple"
            ]
          },
          "ticketPricingOptions": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                }
              },
              "_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          },
          "ticketPolicy": {
            "type": "string",
            "enum": [
              "free_required",
              "paid_required"
            ]
          },
          "issueDigitalPass": {
            "type": "boolean"
          },
          "ticketCapacity": {
            "type": "number"
          },
          "multiRegistration": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "collectAttendeeDetails": {
                "type": "boolean"
              },
              "maxTicketsPerOrder": {
                "type": "number"
              }
            }
          },
          "membershipAccess": {
            "type": "object",
            "properties": {
              "typeMode": {
                "type": "string",
                "enum": [
                  "all",
                  "selected"
                ]
              },
              "membershipTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$"
                }
              },
              "statusMode": {
                "type": "string",
                "enum": [
                  "active_only",
                  "all"
                ]
              }
            }
          },
          "publicOptions": {
            "type": "object",
            "properties": {
              "memberDiscountEnabled": {
                "type": "boolean"
              },
              "memberDiscountType": {
                "type": "string",
                "enum": [
                  "percentage",
                  "fixed"
                ]
              },
              "memberDiscountValue": {
                "type": "number"
              },
              "memberDiscountRules": {
                "type": "object",
                "properties": {
                  "membershipType": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "discountType": {
                    "type": "string",
                    "enum": [
                      "percentage",
                      "fixed"
                    ]
                  },
                  "discountValue": {
                    "type": "number"
                  },
                  "_id": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  }
                }
              }
            }
          },
          "membershipPromotion": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "heading": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "discountEnabled": {
                "type": "boolean"
              },
              "discountType": {
                "type": "string",
                "enum": [
                  "percentage",
                  "fixed"
                ]
              },
              "discountValue": {
                "type": "number"
              },
              "discountCurrency": {
                "type": "string"
              },
              "expiryDays": {
                "type": "number"
              },
              "membershipTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$"
                }
              }
            }
          },
          "purchaseProtection": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "pricingType": {
                "type": "string",
                "enum": [
                  "fixed",
                  "percentage"
                ]
              },
              "amount": {
                "type": "number"
              }
            }
          },
          "addOns": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "imageUrl": {
                "type": "string"
              },
              "imageAttribution": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "unsplash"
                    ]
                  },
                  "photographerName": {
                    "type": "string"
                  },
                  "photographerUrl": {
                    "type": "string"
                  },
                  "sourceUrl": {
                    "type": "string"
                  }
                }
              },
              "description": {
                "type": "string"
              },
              "pricingType": {
                "type": "string",
                "enum": [
                  "fixed",
                  "percentage"
                ]
              },
              "price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                }
              },
              "minQuantity": {
                "type": "number"
              },
              "maxQuantity": {
                "type": "number"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          },
          "discountCodes": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "discountType": {
                "type": "string",
                "enum": [
                  "percentage",
                  "fixed"
                ]
              },
              "value": {
                "type": "number"
              },
              "maxDiscountAmount": {
                "type": "number"
              },
              "usageLimit": {
                "type": "number"
              },
              "minimumSpend": {
                "type": "number"
              },
              "active": {
                "type": "boolean"
              },
              "_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          },
          "purchaseForm": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "requiredFor": {
                "type": "string",
                "enum": [
                  "everyone",
                  "members",
                  "non_members"
                ]
              },
              "form": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              },
              "forms": {
                "type": "object",
                "properties": {
                  "requiredFor": {
                    "type": "string",
                    "enum": [
                      "everyone",
                      "members",
                      "non_members"
                    ]
                  },
                  "form": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "_id": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  }
                }
              }
            }
          }
        },
        "description": "Webhook snapshot of event. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookEventRegistrationSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "event": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "order": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "registrant": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "memberId": {
                "type": "string"
              },
              "membershipVerificationStatus": {
                "type": "string",
                "enum": [
                  "unverified",
                  "verified",
                  "not_a_member"
                ]
              },
              "membershipStatusSnapshot": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "role": {
            "type": "string",
            "enum": [
              "buyer",
              "guest"
            ]
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "cancelled"
            ]
          },
          "paymentStatus": {
            "type": "string",
            "enum": [
              "free",
              "paid",
              "pending",
              "refund_pending",
              "refund_failed",
              "refunded",
              "disputed"
            ]
          },
          "amountPaid": {
            "type": "integer",
            "description": "Minor currency units in webhook snapshots; REST reads use major units"
          },
          "currency": {
            "type": "string"
          },
          "ticketPassInstance": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          }
        },
        "description": "Webhook snapshot of event_registration. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookEventOrderSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "event": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "cancelled"
            ]
          },
          "paymentStatus": {
            "type": "string",
            "enum": [
              "free",
              "paid",
              "pending",
              "refund_pending",
              "refund_failed",
              "refunded",
              "partially_refunded",
              "disputed"
            ]
          },
          "fulfillmentStatus": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "fulfilled",
              "failed",
              "refund_pending",
              "refunded"
            ]
          },
          "amountPaid": {
            "type": "integer",
            "description": "Minor currency units in webhook snapshots; REST reads use major units"
          },
          "refundedAmount": {
            "type": "integer",
            "description": "Minor currency units in webhook snapshots; REST reads use major units"
          },
          "currency": {
            "type": "string"
          },
          "registrantCount": {
            "type": "number"
          },
          "deliveryMode": {
            "type": "string",
            "enum": [
              "buyer_only",
              "individual_recipients"
            ]
          },
          "ticketMode": {
            "type": "string",
            "enum": [
              "named",
              "generic"
            ]
          }
        },
        "description": "Webhook snapshot of event_order. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookDonationSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "campaign": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "subscription": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "donor": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "frequency": {
            "type": "string",
            "enum": [
              "one_off",
              "monthly"
            ]
          },
          "amount": {
            "type": "number"
          },
          "baseAmount": {
            "type": "number"
          },
          "feeContributionAmount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "failed",
              "refund_pending",
              "partially_refunded",
              "refunded",
              "disputed",
              "dispute_lost"
            ]
          },
          "anonymous": {
            "type": "boolean"
          },
          "refundedAmount": {
            "type": "number"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "refundedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "failureReason": {
            "type": "string"
          },
          "disputeStatus": {
            "type": "string",
            "enum": [
              "open",
              "won",
              "lost",
              "warning_closed"
            ]
          },
          "stripeDisputeId": {
            "type": "string"
          },
          "disputedAmount": {
            "type": "number"
          }
        },
        "description": "Webhook snapshot of donation. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookDonationSubscriptionSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "campaign": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "member": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "donor": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "amount": {
            "type": "number"
          },
          "baseAmount": {
            "type": "number"
          },
          "feeContributionAmount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "past_due",
              "cancelled"
            ]
          },
          "anonymous": {
            "type": "boolean"
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "pendingAmountChange": {
            "type": "object",
            "properties": {
              "baseAmount": {
                "type": "number"
              },
              "feeContributionAmount": {
                "type": "number"
              },
              "amount": {
                "type": "number"
              },
              "requestedAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "pendingCancellationRequestedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "description": "Webhook snapshot of donation_subscription. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      },
      "WebhookDonationCampaignSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "company": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ]
          },
          "currency": {
            "type": "string"
          },
          "suggestedAmounts": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "defaultAmount": {
            "type": "number"
          },
          "minimumAmount": {
            "type": "number"
          },
          "maximumCustomAmount": {
            "type": "number"
          },
          "allowCustomAmount": {
            "type": "boolean"
          },
          "allowRecurring": {
            "type": "boolean"
          },
          "promoteMonthlyGiving": {
            "type": "boolean"
          },
          "defaultFrequency": {
            "type": "string",
            "enum": [
              "one_off",
              "monthly"
            ]
          },
          "feeContributionEnabled": {
            "type": "boolean"
          },
          "feeContributionPercent": {
            "type": "number"
          },
          "goalAmount": {
            "type": "number"
          },
          "acknowledgementText": {
            "type": "string"
          },
          "confirmationText": {
            "type": "string"
          },
          "purchaseForm": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "form": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            }
          }
        },
        "description": "Webhook snapshot of donation_campaign. Uses id rather than REST _id; monetary amounts use minor currency units, and percentages retain percentage values."
      }
    }
  },
  "x-webhooks": {
    "scan.created": {
      "post": {
        "operationId": "onScanCreated",
        "summary": "scan.created",
        "description": "Webhook delivery for scan.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanCreatedWebhookPayload"
              },
              "example": {
                "id": "event_example",
                "event": "scan.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "scan": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "source": "web",
                    "member": {
                      "id": "507f1f77bcf86cd799439011",
                      "name": "Example Member",
                      "email": "member@example.com",
                      "memberId": "MEM001"
                    },
                    "input": "EXAMPLE",
                    "result": "success",
                    "timestamp": "2030-05-01T18:00:00.000Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "member.created": {
      "post": {
        "operationId": "onMemberCreated",
        "summary": "member.created",
        "description": "Webhook delivery for member.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "member.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "member": {
                            "$ref": "#/components/schemas/WebhookMemberSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "member.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "member": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "memberId": "MEM001",
                    "name": "Example Member",
                    "email": "member@example.com",
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "member.updated": {
      "post": {
        "operationId": "onMemberUpdated",
        "summary": "member.updated",
        "description": "Webhook delivery for member.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "member.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "member": {
                            "$ref": "#/components/schemas/WebhookMemberSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "member.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "member": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "memberId": "MEM001",
                    "name": "Example Member",
                    "email": "member@example.com",
                    "status": "active"
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "member.status_changed": {
      "post": {
        "operationId": "onMemberStatusChanged",
        "summary": "member.status_changed",
        "description": "Webhook delivery for member.status_changed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "member.status_changed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "member": {
                            "$ref": "#/components/schemas/WebhookMemberSnapshot"
                          },
                          "previous_status": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "member.status_changed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "member": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "memberId": "MEM001",
                    "name": "Example Member",
                    "email": "member@example.com",
                    "status": "active"
                  },
                  "previous_status": "inactive"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "member.deleted": {
      "post": {
        "operationId": "onMemberDeleted",
        "summary": "member.deleted",
        "description": "Webhook delivery for member.deleted. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "member.deleted"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "member": {
                            "$ref": "#/components/schemas/WebhookMemberSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "member.deleted",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "member": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "memberId": "MEM001",
                    "name": "Example Member",
                    "email": "member@example.com",
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.created": {
      "post": {
        "operationId": "onMembershipCreated",
        "summary": "membership.created",
        "description": "Webhook delivery for membership.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "pending",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.updated": {
      "post": {
        "operationId": "onMembershipUpdated",
        "summary": "membership.updated",
        "description": "Webhook delivery for membership.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.activated": {
      "post": {
        "operationId": "onMembershipActivated",
        "summary": "membership.activated",
        "description": "Webhook delivery for membership.activated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.activated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.activated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.renewed": {
      "post": {
        "operationId": "onMembershipRenewed",
        "summary": "membership.renewed",
        "description": "Webhook delivery for membership.renewed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.renewed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.renewed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.expiring": {
      "post": {
        "operationId": "onMembershipExpiring",
        "summary": "membership.expiring",
        "description": "Webhook delivery for membership.expiring. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.expiring"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.expiring",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.expired": {
      "post": {
        "operationId": "onMembershipExpired",
        "summary": "membership.expired",
        "description": "Webhook delivery for membership.expired. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.expired"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.expired",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "expired",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.cancellation_scheduled": {
      "post": {
        "operationId": "onMembershipCancellationScheduled",
        "summary": "membership.cancellation_scheduled",
        "description": "Webhook delivery for membership.cancellation_scheduled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.cancellation_scheduled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.cancellation_scheduled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.cancellation_revoked": {
      "post": {
        "operationId": "onMembershipCancellationRevoked",
        "summary": "membership.cancellation_revoked",
        "description": "Webhook delivery for membership.cancellation_revoked. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.cancellation_revoked"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.cancellation_revoked",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.cancelled": {
      "post": {
        "operationId": "onMembershipCancelled",
        "summary": "membership.cancelled",
        "description": "Webhook delivery for membership.cancelled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.cancelled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.cancelled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "canceled",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.payment_succeeded": {
      "post": {
        "operationId": "onMembershipPaymentSucceeded",
        "summary": "membership.payment_succeeded",
        "description": "Webhook delivery for membership.payment_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.payment_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.payment_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.payment_failed": {
      "post": {
        "operationId": "onMembershipPaymentFailed",
        "summary": "membership.payment_failed",
        "description": "Webhook delivery for membership.payment_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.payment_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.payment_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.refund_created": {
      "post": {
        "operationId": "onMembershipRefundCreated",
        "summary": "membership.refund_created",
        "description": "Webhook delivery for membership.refund_created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.refund_created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.refund_created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "pending",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.refund_succeeded": {
      "post": {
        "operationId": "onMembershipRefundSucceeded",
        "summary": "membership.refund_succeeded",
        "description": "Webhook delivery for membership.refund_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.refund_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.refund_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "succeeded",
                    "cumulative_refunded_amount": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership.refund_failed": {
      "post": {
        "operationId": "onMembershipRefundFailed",
        "summary": "membership.refund_failed",
        "description": "Webhook delivery for membership.refund_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership.refund_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership": {
                            "$ref": "#/components/schemas/WebhookMembershipSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership.refund_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "member": "507f1f77bcf86cd799439011",
                    "membershipType": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "amount": 2500,
                    "currency": "gbp",
                    "cancelAtPeriodEnd": false
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "failed",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership_type.created": {
      "post": {
        "operationId": "onMembershipTypeCreated",
        "summary": "membership_type.created",
        "description": "Webhook delivery for membership_type.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership_type.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership_type": {
                            "$ref": "#/components/schemas/WebhookMembershipTypeSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership_type.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership_type": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Annual membership",
                    "active": true,
                    "price": {
                      "amount": 2500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership_type.updated": {
      "post": {
        "operationId": "onMembershipTypeUpdated",
        "summary": "membership_type.updated",
        "description": "Webhook delivery for membership_type.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership_type.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership_type": {
                            "$ref": "#/components/schemas/WebhookMembershipTypeSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership_type.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership_type": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Annual membership",
                    "active": true,
                    "price": {
                      "amount": 2500,
                      "currency": "gbp"
                    }
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership_type.archived": {
      "post": {
        "operationId": "onMembershipTypeArchived",
        "summary": "membership_type.archived",
        "description": "Webhook delivery for membership_type.archived. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership_type.archived"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership_type": {
                            "$ref": "#/components/schemas/WebhookMembershipTypeSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership_type.archived",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership_type": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Annual membership",
                    "active": false,
                    "price": {
                      "amount": 2500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "membership_type.deleted": {
      "post": {
        "operationId": "onMembershipTypeDeleted",
        "summary": "membership_type.deleted",
        "description": "Webhook delivery for membership_type.deleted. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "membership_type.deleted"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "membership_type": {
                            "$ref": "#/components/schemas/WebhookMembershipTypeSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "membership_type.deleted",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "membership_type": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Annual membership",
                    "active": true,
                    "price": {
                      "amount": 2500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.created": {
      "post": {
        "operationId": "onEventCreated",
        "summary": "event.created",
        "description": "Webhook delivery for event.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "published",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.updated": {
      "post": {
        "operationId": "onEventUpdated",
        "summary": "event.updated",
        "description": "Webhook delivery for event.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "published",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.published": {
      "post": {
        "operationId": "onEventPublished",
        "summary": "event.published",
        "description": "Webhook delivery for event.published. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.published"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.published",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "published",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.unpublished": {
      "post": {
        "operationId": "onEventUnpublished",
        "summary": "event.unpublished",
        "description": "Webhook delivery for event.unpublished. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.unpublished"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.unpublished",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "draft",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.visibility_changed": {
      "post": {
        "operationId": "onEventVisibilityChanged",
        "summary": "event.visibility_changed",
        "description": "Webhook delivery for event.visibility_changed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.visibility_changed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.visibility_changed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "published",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.cancelled": {
      "post": {
        "operationId": "onEventCancelled",
        "summary": "event.cancelled",
        "description": "Webhook delivery for event.cancelled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.cancelled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.cancelled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "cancelled",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event.deleted": {
      "post": {
        "operationId": "onEventDeleted",
        "summary": "event.deleted",
        "description": "Webhook delivery for event.deleted. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event.deleted"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "$ref": "#/components/schemas/WebhookEventSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event.deleted",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "name": "Example event",
                    "status": "published",
                    "audience": "public",
                    "startsAt": "2030-05-01T18:00:00.000Z",
                    "endsAt": "2030-05-01T20:00:00.000Z",
                    "ticketPrice": {
                      "amount": 1500,
                      "currency": "gbp"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_registration.created": {
      "post": {
        "operationId": "onEventRegistrationCreated",
        "summary": "event_registration.created",
        "description": "Webhook delivery for event_registration.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_registration.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_registration": {
                            "$ref": "#/components/schemas/WebhookEventRegistrationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_registration.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_registration": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "order": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "status": "pending",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_registration.confirmed": {
      "post": {
        "operationId": "onEventRegistrationConfirmed",
        "summary": "event_registration.confirmed",
        "description": "Webhook delivery for event_registration.confirmed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_registration.confirmed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_registration": {
                            "$ref": "#/components/schemas/WebhookEventRegistrationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_registration.confirmed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_registration": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "order": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_registration.updated": {
      "post": {
        "operationId": "onEventRegistrationUpdated",
        "summary": "event_registration.updated",
        "description": "Webhook delivery for event_registration.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_registration.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_registration": {
                            "$ref": "#/components/schemas/WebhookEventRegistrationSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_registration.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_registration": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "order": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "currency": "gbp"
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_registration.cancelled": {
      "post": {
        "operationId": "onEventRegistrationCancelled",
        "summary": "event_registration.cancelled",
        "description": "Webhook delivery for event_registration.cancelled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_registration.cancelled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_registration": {
                            "$ref": "#/components/schemas/WebhookEventRegistrationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_registration.cancelled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_registration": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "order": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "status": "cancelled",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_registration.checked_in": {
      "post": {
        "operationId": "onEventRegistrationCheckedIn",
        "summary": "event_registration.checked_in",
        "description": "Webhook delivery for event_registration.checked_in. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_registration.checked_in"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_registration": {
                            "$ref": "#/components/schemas/WebhookEventRegistrationSnapshot"
                          },
                          "scan_id": {
                            "type": "string",
                            "pattern": "^[a-fA-F0-9]{24}$"
                          },
                          "checked_in_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_registration.checked_in",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_registration": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "order": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "currency": "gbp"
                  },
                  "scan_id": "507f1f77bcf86cd799439011",
                  "checked_in_at": "2030-05-01T18:00:00.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.created": {
      "post": {
        "operationId": "onEventOrderCreated",
        "summary": "event_order.created",
        "description": "Webhook delivery for event_order.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "pending",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.confirmed": {
      "post": {
        "operationId": "onEventOrderConfirmed",
        "summary": "event_order.confirmed",
        "description": "Webhook delivery for event_order.confirmed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.confirmed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.confirmed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.cancelled": {
      "post": {
        "operationId": "onEventOrderCancelled",
        "summary": "event_order.cancelled",
        "description": "Webhook delivery for event_order.cancelled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.cancelled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.cancelled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "cancelled",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.payment_succeeded": {
      "post": {
        "operationId": "onEventOrderPaymentSucceeded",
        "summary": "event_order.payment_succeeded",
        "description": "Webhook delivery for event_order.payment_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.payment_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.payment_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.payment_failed": {
      "post": {
        "operationId": "onEventOrderPaymentFailed",
        "summary": "event_order.payment_failed",
        "description": "Webhook delivery for event_order.payment_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.payment_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.payment_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.refund_created": {
      "post": {
        "operationId": "onEventOrderRefundCreated",
        "summary": "event_order.refund_created",
        "description": "Webhook delivery for event_order.refund_created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.refund_created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.refund_created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "pending",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.refund_succeeded": {
      "post": {
        "operationId": "onEventOrderRefundSucceeded",
        "summary": "event_order.refund_succeeded",
        "description": "Webhook delivery for event_order.refund_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.refund_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.refund_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "succeeded",
                    "cumulative_refunded_amount": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "event_order.refund_failed": {
      "post": {
        "operationId": "onEventOrderRefundFailed",
        "summary": "event_order.refund_failed",
        "description": "Webhook delivery for event_order.refund_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "event_order.refund_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "event_order": {
                            "$ref": "#/components/schemas/WebhookEventOrderSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "event_order.refund_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "event_order": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "event": "507f1f77bcf86cd799439011",
                    "status": "active",
                    "paymentStatus": "paid",
                    "amountPaid": 1500,
                    "refundedAmount": 0,
                    "currency": "gbp",
                    "registrantCount": 1
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "failed",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.created": {
      "post": {
        "operationId": "onDonationCreated",
        "summary": "donation.created",
        "description": "Webhook delivery for donation.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.payment_succeeded": {
      "post": {
        "operationId": "onDonationPaymentSucceeded",
        "summary": "donation.payment_succeeded",
        "description": "Webhook delivery for donation.payment_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.payment_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.payment_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.payment_failed": {
      "post": {
        "operationId": "onDonationPaymentFailed",
        "summary": "donation.payment_failed",
        "description": "Webhook delivery for donation.payment_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.payment_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.payment_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.refund_created": {
      "post": {
        "operationId": "onDonationRefundCreated",
        "summary": "donation.refund_created",
        "description": "Webhook delivery for donation.refund_created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.refund_created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.refund_created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "pending",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.refund_succeeded": {
      "post": {
        "operationId": "onDonationRefundSucceeded",
        "summary": "donation.refund_succeeded",
        "description": "Webhook delivery for donation.refund_succeeded. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.refund_succeeded"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.refund_succeeded",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "succeeded",
                    "cumulative_refunded_amount": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.refund_failed": {
      "post": {
        "operationId": "onDonationRefundFailed",
        "summary": "donation.refund_failed",
        "description": "Webhook delivery for donation.refund_failed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.refund_failed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          },
                          "refund": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "payment_intent_id": {
                                "type": "string"
                              },
                              "cumulative_refunded_amount": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.refund_failed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  },
                  "refund": {
                    "id": "re_example",
                    "amount": 1000,
                    "currency": "gbp",
                    "status": "failed",
                    "cumulative_refunded_amount": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.dispute_opened": {
      "post": {
        "operationId": "onDonationDisputeOpened",
        "summary": "donation.dispute_opened",
        "description": "Webhook delivery for donation.dispute_opened. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.dispute_opened"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          },
                          "dispute": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.dispute_opened",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  },
                  "dispute": {
                    "id": "dp_example",
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "open"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation.dispute_closed": {
      "post": {
        "operationId": "onDonationDisputeClosed",
        "summary": "donation.dispute_closed",
        "description": "Webhook delivery for donation.dispute_closed. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation.dispute_closed"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation": {
                            "$ref": "#/components/schemas/WebhookDonationSnapshot"
                          },
                          "dispute": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation.dispute_closed",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "paid"
                  },
                  "dispute": {
                    "id": "dp_example",
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "won"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.created": {
      "post": {
        "operationId": "onDonationSubscriptionCreated",
        "summary": "donation_subscription.created",
        "description": "Webhook delivery for donation_subscription.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.activated": {
      "post": {
        "operationId": "onDonationSubscriptionActivated",
        "summary": "donation_subscription.activated",
        "description": "Webhook delivery for donation_subscription.activated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.activated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.activated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.updated": {
      "post": {
        "operationId": "onDonationSubscriptionUpdated",
        "summary": "donation_subscription.updated",
        "description": "Webhook delivery for donation_subscription.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "active"
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.past_due": {
      "post": {
        "operationId": "onDonationSubscriptionPastDue",
        "summary": "donation_subscription.past_due",
        "description": "Webhook delivery for donation_subscription.past_due. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.past_due"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.past_due",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "past_due"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.cancellation_scheduled": {
      "post": {
        "operationId": "onDonationSubscriptionCancellationScheduled",
        "summary": "donation_subscription.cancellation_scheduled",
        "description": "Webhook delivery for donation_subscription.cancellation_scheduled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.cancellation_scheduled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.cancellation_scheduled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "active",
                    "cancelAtPeriodEnd": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.cancellation_revoked": {
      "post": {
        "operationId": "onDonationSubscriptionCancellationRevoked",
        "summary": "donation_subscription.cancellation_revoked",
        "description": "Webhook delivery for donation_subscription.cancellation_revoked. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.cancellation_revoked"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.cancellation_revoked",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_subscription.cancelled": {
      "post": {
        "operationId": "onDonationSubscriptionCancelled",
        "summary": "donation_subscription.cancelled",
        "description": "Webhook delivery for donation_subscription.cancelled. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_subscription.cancelled"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_subscription": {
                            "$ref": "#/components/schemas/WebhookDonationSubscriptionSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_subscription.cancelled",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_subscription": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "campaign": "507f1f77bcf86cd799439011",
                    "member": "507f1f77bcf86cd799439011",
                    "donor": {
                      "name": "Example Donor",
                      "email": "donor@example.com"
                    },
                    "amount": 2500,
                    "currency": "gbp",
                    "status": "cancelled"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_campaign.created": {
      "post": {
        "operationId": "onDonationCampaignCreated",
        "summary": "donation_campaign.created",
        "description": "Webhook delivery for donation_campaign.created. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_campaign.created"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_campaign": {
                            "$ref": "#/components/schemas/WebhookDonationCampaignSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_campaign.created",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_campaign": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "title": "Example campaign",
                    "slug": "example-campaign",
                    "status": "published",
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_campaign.updated": {
      "post": {
        "operationId": "onDonationCampaignUpdated",
        "summary": "donation_campaign.updated",
        "description": "Webhook delivery for donation_campaign.updated. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_campaign.updated"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_campaign": {
                            "$ref": "#/components/schemas/WebhookDonationCampaignSnapshot"
                          },
                          "changed_fields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "previous_values": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_campaign.updated",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_campaign": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "title": "Example campaign",
                    "slug": "example-campaign",
                    "status": "published",
                    "currency": "gbp"
                  },
                  "changed_fields": [
                    "status"
                  ],
                  "previous_values": {
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_campaign.published": {
      "post": {
        "operationId": "onDonationCampaignPublished",
        "summary": "donation_campaign.published",
        "description": "Webhook delivery for donation_campaign.published. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_campaign.published"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_campaign": {
                            "$ref": "#/components/schemas/WebhookDonationCampaignSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_campaign.published",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_campaign": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "title": "Example campaign",
                    "slug": "example-campaign",
                    "status": "published",
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_campaign.unpublished": {
      "post": {
        "operationId": "onDonationCampaignUnpublished",
        "summary": "donation_campaign.unpublished",
        "description": "Webhook delivery for donation_campaign.unpublished. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_campaign.unpublished"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_campaign": {
                            "$ref": "#/components/schemas/WebhookDonationCampaignSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_campaign.unpublished",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_campaign": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "title": "Example campaign",
                    "slug": "example-campaign",
                    "status": "draft",
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    },
    "donation_campaign.deleted": {
      "post": {
        "operationId": "onDonationCampaignDeleted",
        "summary": "donation_campaign.deleted",
        "description": "Webhook delivery for donation_campaign.deleted. Amounts in webhook snapshots use minor currency units; percentage values remain percentages. The data object contains the resource snapshot and action-specific fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookPayload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "enum": [
                          "donation_campaign.deleted"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "donation_campaign": {
                            "$ref": "#/components/schemas/WebhookDonationCampaignSnapshot"
                          }
                        },
                        "additionalProperties": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "event_example",
                "event": "donation_campaign.deleted",
                "timestamp": "2030-05-01T18:00:00.000Z",
                "organisation_id": "507f1f77bcf86cd799439010",
                "schema_version": "1",
                "source": "api",
                "data": {
                  "donation_campaign": {
                    "id": "507f1f77bcf86cd799439011",
                    "company": "507f1f77bcf86cd799439010",
                    "title": "Example campaign",
                    "slug": "example-campaign",
                    "status": "published",
                    "currency": "gbp"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt"
          }
        }
      }
    }
  }
}
