{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.goodstack.io",
      "description": "Production server"
    },
    {
      "url": "https://sandbox-api.goodstack.io",
      "description": "Sandbox server"
    }
  ],
  "info": {
    "title": "Goodstack Services",
    "version": "v1",
    "x-logo": {
      "url": "https://docs.goodstack.io/img/logo.png",
      "altText": "Goodstack logo"
    },
    "x-dark-logo": {
      "url": "https://docs.goodstack.io/img/icons/Logo-white.svg",
      "altText": "Goodstack logo"
    },
    "contact": {
      "email": "engineering-support@goodstack.io",
      "name": "Api support"
    },
    "description": "# Introduction\n\nGoodstack API allows you to build good into your product by facilitating charitable donations. We achieve this through the API's listed and specified in this documentation.\n\nFor all donations using the Goodstack API, Goodstack handles the vetting and validation of the good causes and onward the disbursement of the donation.\n\nThe Goodstack API is organised around REST. All API responses, including errors, return JSON and use standard HTTP response codes. In all API requests you must specify the content-type HTTP header as application/json. All API requests must be made over HTTPS.\n\n# Authentication\n\nAuthenticate your API requests by setting your live secret API key in the Authorization header.\n\nTwo keys are provided to you, a publishable key prefixed with `pk_` and a secret key prefixed with `sk_`.\n\nPublishable API keys are meant solely to identify your goodstack account. These can safely be published in places like your JavaScript code, or in an Android or iPhone app and are meant for usage with our SDKs.\n\nSecret API keys should be kept confidential and only used in secure server environments.\n\nAnywhere that accepts a Publishable key will also accept a Secret key, but routes marked to accept a Secret key will not accept a Publishable key.\n\n# Formats\n\n## Dates\n\nDates are encoded as strings following the ISO 8601 standard `2021-08-01T12:00:00.000Z`.\n\n## Pagination\n\nA maximum of 100 objects can be returned per request and the limit can be specified by using the pageSize query parameter. By default, the pageSize is set to 25.\n\n## Metadata\n\nSome objects have a metadata parameter that you can use to store key-value data.\n\nYou can specify up to 20 keys, with key names up to 40 characters long and values up to 250 characters long.\n\n## Errors\n\nThe API returns standard HTTP response codes to indicate success or failure of API requests. Errors may include a custom error message.\nError objects have these attributes, an `id`, a `message` corresponding to the HTTP response phrase of the error,\nan optional `invalid-params` attribute detailing issues with the request.\n\nAn example error object returned from the API:\n```json\n{\n  error: {\n    code: 'bad_request',\n    title: 'Bad request',\n    message: 'Something is wrong with your request, please check any parameters and try again',\n    reasons: ['amount is a required field']\n  }\n}\n```\n\nA summary of the HTTP status codes returned from the api is listed in the table below.\n\n| Code        | Title           | Description  |\n| ------------- |-------------| -----|\n| 200      | Success | Request successful |\n| 204      | No Content      |   Request successful with no content returned |\n| 400 | Bad Request      | Request was invalid |\n| 401 | Unauthorised | Authorization header is invalid |\n| 403 | Forbidden | Insufficient permissions |\n| 404 | Not Found | Resource does not exist |\n| 429 | Too Many Requests | Rate Limited |\n| 500s | Internal Server Error | Something went wrong with the Goodstack API |\n\n# Retry recommendations\n\nAlthough rare, network requests may fail due to their inherent unreliability. To ensure a robust integration with Goodstack we recommend that you implement a retry mechanism, so that if a network request fails you are able to retry the request.\nGoodstacks API supports idempotency for safely retrying requests through usage of idempotency keys.\n\nFor some POST endpoints we allow clients to specify an idempotency key in the Idempotency-Key header. This allows the client to retry requests without accidentally performing the same operation twice.\n\nIf the same idempotency key is used for multiple requests, only the first successful request will be actioned and subsequent calls will return the result of the first request. Failed requests may be retried with the same idempotency key.\n\nRequests with the same idempotency key and different payload will fail.\n\nThe idempotency key expires after 21 days. After this time, a new request with the same idempotency key will be treated as a new request.\n\n# Webhooks\n\nUse webhooks to subscribe to updates on particular events that occur in Goodstack. Each time an event that you have subscribed to occurs, Goodstack submits a POST request to the designated webhook URL with information about the event.\n\nTo receive webhook notifications, use the [webhook subscriptions API](#tag/Webhook-Subscriptions). \n\nFor detailed webhook event specifications, see the webhook events section.\n\n## Webhook Structure\n\nAll webhook payloads contain `object` and `data` fields. The data record contains:\n\n| Parameter | Type   | Description |\n|-----------|--------|-------------|\n| id        | string | Id of the event |\n| createdAt | string | Timestamp of when the event was created |\n| eventType | string | The type of the event e.g. `validation_request.approved` |\n| eventData | record | Data associated with the event |\n\n## Webhook Security & Delivery\n\n**IP Addresses:** Webhook notifications come from these IP addresses:\n\nProduction: `54.228.234.204`, `54.76.67.168`, `34.248.188.89`, `34.243.152.218`\n\nSandbox: `79.125.45.124`, `54.76.168.240`, `99.81.243.145`, `54.220.118.167`\n\n**Response Requirements:** Your endpoint must return a 2xx HTTP status code to acknowledge receipt.\n\n**Retry Policy:** Failed webhooks are retried 4 times over 14 hours with increasing delays.\n\n**Verification:** Each webhook includes a `Goodstack-Signature` header generated using HMAC SHA-256 with your webhook subscription secret as the key.\n\n**Idempotency:** Use the event `id` to handle duplicate webhook deliveries idempotently.\n"
  },
  "tags": [
    {
      "name": "Validation Requests",
      "description": "If you want to know if a nonprofit exists in an official registry, create a Validation Request and we will check it for you.  Documentary evidence can be attached to a Validation Request.  When a Validation Request is accepted or rejected, the appropriate field (acceptedAt, rejectedAt) will be populated."
    },
    {
      "name": "Donations",
      "description": "A Donation object tracks the lifecycle of a Donation from creation and payment to disbursement to the nonprofit.\n\nDonations can be created during a Donation Session by the Hosted Donation Gateway or created directly by calling the [Create A Donation API](create-a-donation).\n"
    },
    {
      "name": "Organisations",
      "description": "Nonprofits are represented by the Organisation object. You can retrieve and query for Organisations."
    },
    {
      "name": "Users",
      "description": "The User object represents a user of your application. It can be used to track Donations that belong to that user."
    },
    {
      "name": "Categories",
      "description": "Categories represent collections of Organisations, which can be used to group and filter Organisations."
    },
    {
      "name": "Agent Verifications",
      "description": "Agent verification is a one-off check. It is used to confirm that:\n  1. The person applying is who they say they are.\n  2. They represent the nonprofit.\n\nThey are not editable once created.\n"
    },
    {
      "name": "Monetary Donation Verifications",
      "description": "Monetary Donation Verification is a check used to confirm whether a given organisation is eligible to receive monetary donations."
    },
    {
      "name": "Validation Request Events",
      "description": "Webhook events triggered when validation requests are approved or rejected by Goodstack.\n"
    },
    {
      "name": "Agent Verification Events",
      "description": "Webhook events triggered during the agent verification process, from pending states to final approval or rejection.\n"
    },
    {
      "name": "Monitoring Subscription Events",
      "description": "Webhook events triggered when monitoring subscription status changes, including compliance check results.\n"
    },
    {
      "name": "Eligibility Subscription Events",
      "description": "Webhook events triggered when eligibility subscription status changes, including activity tag confirmations.\n"
    },
    {
      "name": "Validation Submission Events",
      "description": "Webhook events triggered throughout the validation submission lifecycle, from creation to completion or failure.\n"
    },
    {
      "name": "Donation Events",
      "description": "Webhook events triggered throughout the donation lifecycle, from payment receipt to final disbursement or cancellation.\n"
    },
    {
      "name": "Monetary Donation Verification Events",
      "description": "Webhook events triggered during the monetary donation verification lifecycle, from receiving a new verification to status changes as checks progress.\n"
    },
    {
      "name": "SCIM",
      "description": "SCIM 2.0 compliant API for provisioning and managing users. All `/scim/v2`\nendpoints authenticate with a partner SCIM API key as a bearer token and\nrequire the partner's `scim_api` scope. Responses use the\n`application/scim+json` media type.\n"
    }
  ],
  "x-tagGroups": [
    {
      "name": "NONPROFIT DATA",
      "tags": [
        "Organisations",
        "Countries",
        "Registries",
        "Categories",
        "Organisation Branding"
      ]
    },
    {
      "name": "NONPROFIT VALIDATIONS",
      "tags": [
        "Validation Requests",
        "Validation Request Documents",
        "Validation Invites",
        "Validation Submissions",
        "Validation Submission Documents",
        "Validation Submission Configuration",
        "Monitoring Subscriptions",
        "Eligibility Subscriptions",
        "Activities",
        "Agent Verifications"
      ]
    },
    {
      "name": "MONETARY DONATIONS",
      "tags": [
        "Donations",
        "Donation Sessions",
        "Users",
        "Gift Aid",
        "Monetary Donation Verifications"
      ]
    },
    {
      "name": "WEBHOOK SUBSCRIPTIONS",
      "tags": [
        "Webhook Subscriptions"
      ]
    },
    {
      "name": "WEBHOOK EVENTS",
      "tags": [
        "Agent Verification Events",
        "Donation Events",
        "Eligibility Subscription Events",
        "Monitoring Subscription Events",
        "Validation Request Events",
        "Validation Submission Events",
        "Monetary Donation Verification Events"
      ]
    }
  ],
  "paths": {
    "/webhooks/validation-request-approved": {
      "post": {
        "summary": "Validation request was approved",
        "description": "Triggered when a validation request has been approved by Goodstack.",
        "operationId": "webhookValidationRequestApproved",
        "tags": [
          "Validation Request Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationRequestWebhookEvent"
              },
              "example": {
                "object": "event",
                "data": {
                  "id": "event_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  "eventType": "validation_request.approved",
                  "createdAt": "2021-08-01T12:00:00.000Z",
                  "eventData": {
                    "id": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "organisationTypes": [
                      "nonprofit",
                      "social_impact"
                    ],
                    "name": "example charity",
                    "registryName": "National Charities Registry",
                    "registryId": "I34324",
                    "email": "example@example.com",
                    "addressLine1": "example street 15",
                    "addressLine2": null,
                    "city": "Katowice",
                    "postal": "44-100",
                    "state": "Silesia",
                    "website": "https://example.com",
                    "countryCode": "POL",
                    "createdAt": "2021-08-01T12:00:00.000Z",
                    "deletedAt": null,
                    "acceptedAt": "2021-08-01T12:00:00.000Z",
                    "rejectedAt": null,
                    "rejectionReasonCode": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/validation-request-rejected": {
      "post": {
        "summary": "Validation request was rejected",
        "description": "Triggered when a validation request has been rejected by Goodstack.",
        "operationId": "webhookValidationRequestRejected",
        "tags": [
          "Validation Request Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationRequestWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/agent-verification-pending-user-verification": {
      "post": {
        "summary": "Agent verification pending user verification",
        "description": "Agent has passed Goodstack review, and is awaiting email verification.",
        "operationId": "webhookAgentVerificationPendingUserVerification",
        "tags": [
          "Agent Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVerificationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/agent-verification-pending-review": {
      "post": {
        "summary": "Agent verification pending review",
        "description": "Agent has passed email verification and is awaiting Goodstack review.",
        "operationId": "webhookAgentVerificationPendingReview",
        "tags": [
          "Agent Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVerificationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/agent-verification-approved": {
      "post": {
        "summary": "Agent verification was approved",
        "description": "Triggered when an agent verification has been approved by Goodstack.",
        "operationId": "webhookAgentVerificationApproved",
        "tags": [
          "Agent Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVerificationWebhookEvent"
              },
              "example": {
                "object": "event",
                "data": {
                  "id": "event_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  "eventType": "agent_verification.approved",
                  "createdAt": "2021-08-01T12:00:00.000Z",
                  "eventData": {
                    "id": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "firstName": "Max",
                    "lastName": "Plank",
                    "organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "email": "example@example.com",
                    "language": "en-GB",
                    "validationRequestId": "validationRequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "title": "Board Member",
                    "rejectionReasonCode": "user_failed_percent_review",
                    "metadata": {},
                    "createdAt": "2021-08-01T12:00:00.000Z",
                    "status": "approved"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/agent-verification-rejected": {
      "post": {
        "summary": "Agent verification was rejected",
        "description": "Triggered when an agent verification has been rejected by Goodstack.",
        "operationId": "webhookAgentVerificationRejected",
        "tags": [
          "Agent Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVerificationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/monitoring-subscription-updated": {
      "post": {
        "summary": "Monitoring subscription was updated",
        "description": "Triggered when a monitoring subscription has been updated.",
        "operationId": "webhookMonitoringSubscriptionUpdated",
        "tags": [
          "Monitoring Subscription Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringSubscriptionWebhookEvent"
              },
              "example": {
                "object": "event",
                "data": {
                  "id": "event_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  "eventType": "monitoring_subscription.updated",
                  "createdAt": "2021-08-07T11:00:00.000Z",
                  "eventData": {
                    "id": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "validationRequestId": null,
                    "status": "live",
                    "createdAt": "2021-08-02T11:00:00.000Z",
                    "results": {
                      "complianceStatus": "fail",
                      "warning": {
                        "status": "clear"
                      },
                      "sanction": {
                        "status": "flag"
                      },
                      "hateSpeech": {
                        "status": "clear"
                      },
                      "commercial": {
                        "status": "clear"
                      },
                      "adverseMedia": {
                        "status": "clear"
                      },
                      "controversial": {
                        "status": "flag"
                      },
                      "registration": {
                        "active": "yes"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/eligibility-subscription-updated": {
      "post": {
        "summary": "Eligibility subscription was updated",
        "description": "Triggered when an eligibility subscription has been updated.",
        "operationId": "webhookEligibilitySubscriptionUpdated",
        "tags": [
          "Eligibility Subscription Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EligibilitySubscriptionWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/validation-submission-created": {
      "post": {
        "summary": "Validation submission was created",
        "description": "Triggered when a validation submission has been created.",
        "operationId": "webhookValidationSubmissionCreated",
        "tags": [
          "Validation Submission Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationSubmissionWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/validation-submission-succeeded": {
      "post": {
        "summary": "Validation submission has passed all checks",
        "description": "Triggered when a validation submission has successfully passed all validation checks.",
        "operationId": "webhookValidationSubmissionSucceeded",
        "tags": [
          "Validation Submission Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationSubmissionWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/validation-submission-failed": {
      "post": {
        "summary": "Validation submission has failed",
        "description": "Triggered when a validation submission has failed validation checks.",
        "operationId": "webhookValidationSubmissionFailed",
        "tags": [
          "Validation Submission Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationSubmissionWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/validation-submission-updated": {
      "post": {
        "summary": "Validation submission status has updated",
        "description": "Triggered when a validation submission status has been updated.",
        "operationId": "webhookValidationSubmissionUpdated",
        "tags": [
          "Validation Submission Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationSubmissionWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-hosted-payment-received": {
      "post": {
        "summary": "Payment received for hosted donation",
        "description": "Payment has been received from the user for a hosted donation.",
        "operationId": "webhookDonationHostedPaymentReceived",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              },
              "example": {
                "object": "event",
                "data": {
                  "id": "event_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  "eventType": "donation.hosted.payment_received",
                  "createdAt": "2021-08-07T11:00:30.000Z",
                  "eventData": {
                    "id": "donation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "userId": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "hosted",
                    "hosted": {
                      "sessionId": "donationsession_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "amount": 10000,
                    "currencyCode": "AUD",
                    "status": "RECEIVED_PAYMENT",
                    "firstName": "Julia",
                    "lastName": "Russell",
                    "email": "example@example.com",
                    "consentedToBeContactedByOrg": "yes",
                    "anonymous": "no",
                    "giftAidId": null,
                    "cancelledAt": null,
                    "createdAt": "2021-08-07T11:00:00.000Z",
                    "metadata": {
                      "username": "jr123"
                    },
                    "subscription": {
                      "initial": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-created": {
      "post": {
        "summary": "Donation record created",
        "description": "A new donation record has been successfully created in the system.",
        "operationId": "webhookDonationCreated",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-payment-successful": {
      "post": {
        "summary": "Donation payment successful",
        "description": "The payment for the donation has been successfully completed and verified.",
        "operationId": "webhookDonationPaymentSuccessful",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-settled": {
      "post": {
        "summary": "Donation settled",
        "description": "The donated funds have been received and reconciled by the partner foundation.",
        "operationId": "webhookDonationSettled",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-disbursed": {
      "post": {
        "summary": "Donation disbursed",
        "description": "The donated funds have been transferred to the intended nonprofit.",
        "operationId": "webhookDonationDisbursed",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-cancelled": {
      "post": {
        "summary": "Donation cancelled",
        "description": "The donation process has been terminated, either by the donor or due to system issues.",
        "operationId": "webhookDonationCancelled",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/donation-reassigned": {
      "post": {
        "summary": "Donation reassigned",
        "description": "The donation has been reassigned to another organisation, either because it has failed compliance, we are unable to pay the organisation or the organisation has been merged with another id.",
        "operationId": "webhookDonationReassigned",
        "tags": [
          "Donation Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DonationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/monetary-donation-verification-received": {
      "post": {
        "summary": "Monetary donation verification received",
        "description": "Triggered when a new monetary donation verification has been received and created.",
        "operationId": "webhookMonetaryDonationVerificationReceived",
        "tags": [
          "Monetary Donation Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonetaryDonationVerificationWebhookEvent"
              },
              "example": {
                "object": "event",
                "data": {
                  "id": "event_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  "eventType": "monetary_donation_verification.received",
                  "createdAt": "2021-08-01T12:00:00.000Z",
                  "eventData": {
                    "id": "911b7e0d-244b-428a-80c6-6fbd4519f1cc",
                    "organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "status": {
                      "type": "pending",
                      "awaitingAnswerFromOrganisation": false
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/webhooks/monetary-donation-verification-progressed": {
      "post": {
        "summary": "Monetary donation verification progressed",
        "description": "Triggered when a monetary donation verification has progressed, such as a check succeeding, failing, the verification being approved, rejected, expired, or reopened.",
        "operationId": "webhookMonetaryDonationVerificationProgressed",
        "tags": [
          "Monetary Donation Verification Events"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonetaryDonationVerificationWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload or signature verification failed"
          }
        },
        "x-internal": false,
        "x-webhook": true
      }
    },
    "/v1/agent-verifications": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Agent Verifications",
        "tags": [
          "Agent Verifications"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "pending_user_verification",
                "pending_review",
                "approved",
                "rejected"
              ]
            }
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            },
            "description": "filter on the Agent Verification list by email",
            "example": "joe"
          },
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Start date to filter Agent Verifications.",
            "example": "2020-10-13T17:46:54.000Z"
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "End date to filter Agent Verifications.",
            "example": "2020-10-13T17:46:54.000Z"
          },
          {
            "$ref": "#/components/parameters/direction"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved list of Agent Verifications",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentVerification"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "agent_verification"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "summary": "Create an Agent Verification",
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "tags": [
          "Agent Verifications"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string",
                        "description": "First name of Agent",
                        "example": "Max",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "description": "Last name of Agent",
                        "example": "Plank",
                        "maxLength": 255
                      },
                      "organisationId": {
                        "type": "string",
                        "description": "Id of the Organisation for which the Agent Verification is for",
                        "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "email": {
                        "type": "string",
                        "description": "Email Id of the agent",
                        "example": "example@example.com",
                        "maxLength": 255
                      },
                      "title": {
                        "type": "string",
                        "example": "Board Member",
                        "description": "Job Title",
                        "maxLength": 255
                      },
                      "organisationWebsite": {
                        "type": "string",
                        "format": "website",
                        "nullable": true,
                        "description": "Organisation Website link",
                        "maxLength": 255
                      },
                      "language": {
                        "type": "string",
                        "description": "Valid RFC 5646 language code"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "email",
                      "organisationId"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string",
                        "description": "First name of Agent",
                        "example": "Max",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "description": "Last name of Agent",
                        "example": "Plank",
                        "maxLength": 255
                      },
                      "validationRequestId": {
                        "type": "string",
                        "description": "Validation Request Id if not part of organisation",
                        "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "email": {
                        "type": "string",
                        "description": "Email Id of the agent",
                        "example": "example@example.com",
                        "maxLength": 255
                      },
                      "title": {
                        "type": "string",
                        "example": "Board Member",
                        "description": "Job Title",
                        "maxLength": 255
                      },
                      "organisationWebsite": {
                        "type": "string",
                        "format": "website",
                        "nullable": true,
                        "description": "Organisation Website link",
                        "maxLength": 255
                      },
                      "language": {
                        "type": "string",
                        "description": "Valid RFC 5646 language code",
                        "example": "en-GB"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "email",
                      "validationRequestId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Agent Verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentVerification"
                    },
                    "object": {
                      "type": "string",
                      "example": "agent_verification"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/agent-verifications/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Agent Verification."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve an Agent Verification",
        "tags": [
          "Agent Verifications"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a Agent Verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentVerification"
                    },
                    "object": {
                      "type": "string",
                      "example": "agent_verification"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Edit an Agent Verification",
        "description": "Update an Agent Verifications metadata.",
        "tags": [
          "Agent Verifications"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata": {
                    "description": "Metadata object that will be merged with current metadata object.",
                    "type": "object",
                    "maxProperties": 20,
                    "additionalProperties": {
                      "description": "Max key size is 40 characters. If key matches already existing key, it will override old value",
                      "type": "string",
                      "maxLength": 250
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully update Agent Verification metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentVerification"
                    },
                    "object": {
                      "type": "string",
                      "example": "agent_verification"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "InvalidMetadata": {
                    "$ref": "#/components/examples/AgentVerification.InvalidMetadata"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/categories": {
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "List Categories",
        "tags": [
          "Categories"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a list of Categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Category"
                      }
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    },
                    "object": {
                      "type": "string",
                      "example": "Category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "summary": "Create a Category",
        "tags": [
          "Categories"
        ],
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "New Category name"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "description": "A user-defined record of key-value pairs where the value can be a string, boolean, number, or null.",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Category"
                    },
                    "object": {
                      "type": "string",
                      "example": "Category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/categories/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Category"
        }
      ],
      "patch": {
        "summary": "Edit a Category",
        "tags": [
          "Categories"
        ],
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "New Category name"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "description": "A user-defined record of key-value pairs where the value can be a string, boolean, number, or null.",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully edited a Category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Category"
                    },
                    "object": {
                      "type": "string",
                      "example": "Category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Delete a Category",
        "tags": [
          "Categories"
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted a Category"
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Retrieve a Category",
        "tags": [
          "Categories"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a Category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Category"
                    },
                    "object": {
                      "type": "string",
                      "example": "Category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/categories/{categoryId}/{organisationId}": {
      "parameters": [
        {
          "in": "path",
          "name": "categoryId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Category"
        },
        {
          "in": "path",
          "name": "organisationId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the organisation"
        }
      ],
      "put": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Add a Organisation to a Category",
        "tags": [
          "Categories",
          "Organisation"
        ],
        "responses": {
          "200": {
            "description": "Successfully add an Organisation to a Category"
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Remove a Organisation from a Category",
        "tags": [
          "Categories",
          "Organisation"
        ],
        "responses": {
          "204": {
            "description": "Successfully remove a Organisation from a Category"
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/categories/{categoryId}/image": {
      "parameters": [
        {
          "in": "path",
          "name": "categoryId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Category"
        }
      ],
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Set an Image for a Category",
        "tags": [
          "Categories"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully add an image to a Category"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "TooManyAttachments": {
                    "$ref": "#/components/examples/Upload.TooManyAttachments"
                  },
                  "ContentTypeError": {
                    "$ref": "#/components/examples/Upload.ContentTypeError"
                  },
                  "MaxFileSize": {
                    "$ref": "#/components/examples/Upload.MaxFileSize"
                  },
                  "FiletypeNotSupported": {
                    "$ref": "#/components/examples/Upload.FiletypeNotSupported"
                  },
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/countries": {
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "hasRegistry",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Only return Countries with Registries"
          }
        ],
        "summary": "List available Countries",
        "description": "This endpoint will return all the Countries that Goodstack currently supports.  If hasRegistry is true, it will return the subset of Countries that Goodstack currently has nonprofit data for.",
        "tags": [
          "Countries"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Countries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "Country"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/eligibility-subscriptions": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Eligibility Subscriptions",
        "description": "List Eligibility Subscriptions",
        "tags": [
          "Eligibility Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "id"
              ]
            },
            "description": "Field to sort"
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "example": "Example organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
              "description": "Organisation ID"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "pending_validation_request",
                "validation_request_failed",
                "pending",
                "live",
                "cancelled",
                "cannot_define_eligibility"
              ]
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Start date to retrieve monitoring from.",
            "example": "2020-10-13T17:46:54.000Z"
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2020-10-13T17:46:54.000Z"
            }
          },
          {
            "in": "query",
            "name": "hasOrganisation",
            "description": "Filter eligibility subscriptions based on whether there is a recognised Organisation tied to the subscription",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/direction"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a page of Eligibility Subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EligibilitySubscription"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "eligibility_subscription"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create an Eligibility Subscription",
        "tags": [
          "Eligibility Subscriptions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "organisationId": {
                        "type": "string"
                      },
                      "suggestedActivitySubTags": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                        },
                        "nullable": true
                      }
                    },
                    "required": [
                      "organisationId"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "validationRequestId": {
                        "type": "string"
                      },
                      "suggestedActivitySubTags": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                        },
                        "nullable": true
                      }
                    },
                    "required": [
                      "validationRequestId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Eligibility Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EligibilitySubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "eligibility_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "EntityNotFound": {
                    "$ref": "#/components/examples/EligibilitySubscription.EntityNotFound"
                  },
                  "OrganisationNotActive": {
                    "$ref": "#/components/examples/EligibilitySubscription.OrganisationNotActive"
                  },
                  "InvalidSubTags": {
                    "$ref": "#/components/examples/EligibilitySubscription.InvalidSubTags"
                  },
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/eligibility-subscriptions/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Eligibility Subscription."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve an single Eligibility Subscription",
        "tags": [
          "Eligibility Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved an Eligibility Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EligibilitySubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "eligibility_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Edit an Eligibility Subscription",
        "description": "Update an Eligibility Subscription's metadata.",
        "tags": [
          "Eligibility Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata": {
                    "description": "Metadata object that will be merged with current metadata object.",
                    "type": "object",
                    "maxProperties": 20,
                    "additionalProperties": {
                      "description": "Max key size is 40 characters. If key matches already existing key, it will override old value",
                      "type": "string",
                      "maxLength": 250
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updates Eligibility Subscription's metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EligibilitySubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "eligibility_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "InvalidMetadata": {
                    "$ref": "#/components/examples/EligibilitySubscription.InvalidMetadata"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/eligibility-subscriptions/{id}/cancel": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Eligibility Subscription."
        }
      ],
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Cancel an Eligibility Subscription",
        "tags": [
          "Eligibility Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Successfully cancel an Eligibility Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EligibilitySubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "eligibility_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "EligibilitySubscriptionAlreadyCancelled": {
                    "$ref": "#/components/examples/EligibilitySubscription.EligibilitySubscriptionAlreadyCancelled"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/monitoring-subscriptions": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Monitoring Subscriptions",
        "tags": [
          "Monitoring Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "id"
              ]
            },
            "description": "Field to sort by"
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by organisation name, organisation ID, or organisation registry ID.",
            "example": "save"
          },
          {
            "in": "query",
            "name": "hasOrganisation",
            "schema": {
              "type": "boolean"
            },
            "description": "Filter monitoring subscriptions based on whether there is a recognised Organisation tied to the subscription"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a page of Monitoring Subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitoringSubscription"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "monitoring_subscription"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Monitoring Subscription",
        "tags": [
          "Monitoring Subscriptions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "organisationId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "organisationId"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "validationRequestId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "validationRequestId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Monitoring Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringSubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "monitoring_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "EntityNotFound": {
                    "$ref": "#/components/examples/MonitoringSubscription.EntityNotFound"
                  },
                  "OrganisationNotActive": {
                    "$ref": "#/components/examples/MonitoringSubscription.OrganisationNotActive"
                  },
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/monitoring-subscriptions/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Monitoring Subscription."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a Monitoring Subscription",
        "tags": [
          "Monitoring Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a Monitoring Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringSubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "monitoring_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/monitoring-subscriptions/{id}/cancel": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Monitoring Subscription."
        }
      ],
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Cancel a Monitoring Subscription",
        "tags": [
          "Monitoring Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Successfully cancelled a Monitoring Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringSubscriptionCancelledResponseData"
                    },
                    "object": {
                      "type": "string",
                      "example": "monitoring_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "MonitoringSubscriptionAlreadyCancelled": {
                    "$ref": "#/components/examples/MonitoringSubscription.MonitoringSubscriptionAlreadyCancelled"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/registries": {
      "parameters": [
        {
          "in": "query",
          "name": "countryCode",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "3 letter ISO-3166 alpha 3 identifier of the country"
        },
        {
          "in": "query",
          "name": "supportedTypes[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "education",
                "nonprofit",
                "social_impact"
              ]
            },
            "example": [
              "nonprofit",
              "social_impact"
            ],
            "description": "Filter by registries that contains at least one of the supported organisation types.\n```\n?supportedTypes[]=nonprofit&supportedTypes[]=social_impact\n```\nwill return all registries that support either nonprofit or social impact organisations.\n"
          }
        }
      ],
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "List Registries",
        "tags": [
          "Registries"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Registries for a Country",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Registry"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "Registry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/registries/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the registry"
        }
      ],
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Retrieve a Registry",
        "tags": [
          "Registries"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a Registry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Registry"
                    },
                    "object": {
                      "type": "string",
                      "example": "Registry"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-invites": {
      "post": {
        "summary": "Create a Validation Invite",
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "tags": [
          "Validation Invites"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "redirectUrl": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 255,
                    "description": "Url that the hosted form redirects to after the flow is completed",
                    "example": "https://example.com/finish"
                  },
                  "metadata": {
                    "type": "object",
                    "description": "You can use this parameter to attach key-value data to a Validation Invite"
                  },
                  "language": {
                    "type": "string",
                    "description": "Valid RFC 5646 language code",
                    "example": "en-GB"
                  },
                  "hostedConfigId": {
                    "type": "string",
                    "description": "Hosted configuration id",
                    "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Validation Invite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidationInvite"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_invite"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/validation-requests": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Validation Requests",
        "tags": [
          "Validation Requests"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "rejected"
              ]
            },
            "description": "Filter for status of Validation Request",
            "example": "pending"
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "filter for name of ValidationRequest or assigned Organisation"
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "name"
              ]
            },
            "description": "Field to sort by",
            "example": "name"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully listed Validation Requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ValidationRequest"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "organisationName": {
                                "type": "string",
                                "description": "assigned organisation's name",
                                "nullable": true
                              }
                            }
                          }
                        ]
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_request"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "summary": "Create a Validation Request",
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "tags": [
          "Validation Requests"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the charity to validate",
                    "maxLength": 500
                  },
                  "registryName": {
                    "type": "string",
                    "description": "Name of charity's registry",
                    "maxLength": 255
                  },
                  "registryId": {
                    "type": "string",
                    "description": "Charity's id in registry",
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "example": "test@goodstack.internal",
                    "maxLength": 255
                  },
                  "addressLine1": {
                    "type": "string",
                    "example": "Testowa street 15",
                    "maxLength": 255
                  },
                  "addressLine2": {
                    "type": "string",
                    "example": "Testowa street 22/15",
                    "maxLength": 255
                  },
                  "city": {
                    "type": "string",
                    "example": "Katowice",
                    "maxLength": 255
                  },
                  "postal": {
                    "type": "string",
                    "example": "44-100",
                    "maxLength": 255
                  },
                  "state": {
                    "type": "string",
                    "example": "Silesia",
                    "maxLength": 255
                  },
                  "website": {
                    "type": "string",
                    "format": "website",
                    "example": "https://goodstack.internal",
                    "maxLength": 255
                  },
                  "countryCode": {
                    "type": "string",
                    "example": "POL"
                  },
                  "usaGroupExempt": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "registryName",
                  "registryId",
                  "website",
                  "countryCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Validation Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidationRequest"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_request"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/validation-requests/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Validation Request."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a Validation Request",
        "tags": [
          "Validation Requests"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a Validation Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidationRequest"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_request"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-requests/{validationRequestId}/document": {
      "parameters": [
        {
          "in": "path",
          "name": "validationRequestId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Validation Request to add a document to"
        }
      ],
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Validation Request Document",
        "description": "Uploads a document and updates the Validation Request to refer to that document. Valid file formats for documents are `jpg`, `png` and `pdf`. The maximum file size is 5MB. `heic`/`heif` photos are accepted too and are converted to `jpg` on upload.",
        "tags": [
          "Validation Request Documents"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully uploaded document and updated Validation Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidationRequest"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_request"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Idempotency.SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "MultipartBoundaryNotFound": {
                    "$ref": "#/components/examples/Upload.MultipartBoundaryNotFound"
                  },
                  "TooManyAttachments": {
                    "$ref": "#/components/examples/Upload.TooManyAttachments"
                  },
                  "ContentTypeError": {
                    "$ref": "#/components/examples/Upload.ContentTypeError"
                  },
                  "MaxFileSize": {
                    "$ref": "#/components/examples/Upload.MaxFileSize"
                  },
                  "FiletypeNotSupported": {
                    "$ref": "#/components/examples/Upload.FiletypeNotSupported"
                  },
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-submission-configurations": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve partner's configurations",
        "tags": [
          "Validation Submission Configuration"
        ],
        "responses": {
          "200": {
            "description": "Successfully fetch configurations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Validation Submission configuration id",
                            "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                          },
                          "name": {
                            "type": "string",
                            "description": "Validation Submission configuration name",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_submission_configuration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/validation-submission-documents": {
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create Validation Submission Document",
        "description": "Uploads a Validation Submission document. Valid file formats for documents are `jpg`, `png` and `pdf`. The maximum file size is 5MB. `heic`/`heif` photos are accepted too and are converted to `jpg` on upload.",
        "tags": [
          "Validation Submission Documents"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document to validate. Valid file formats for documents are `jpg`, `png` and `pdf`. The maximum file size is 5MB. `heic`/`heif` photos are accepted too and are converted to `jpg` on upload."
                  },
                  "validationSubmissionId": {
                    "type": "string",
                    "example": "validationsubmission_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "description": "Validation submission id"
                  },
                  "documentType": {
                    "type": "string",
                    "enum": [
                      "validation_request",
                      "agent_verification"
                    ],
                    "example": "validation_request",
                    "description": "Defines whether the document relates to a Validation Request or an Agent Verification"
                  }
                },
                "required": [
                  "validationSubmissionId",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully uploaded Validation Submission document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidationSubmissionDocumentWithoutValidationInviteId"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_submission_document"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "FiletypeNotSupported": {
                    "$ref": "#/components/examples/Upload.FiletypeNotSupported"
                  },
                  "FileIsMissing": {
                    "$ref": "#/components/examples/Upload.FileIsMissing"
                  },
                  "MaxFileSize": {
                    "$ref": "#/components/examples/Upload.MaxFileSize"
                  },
                  "ValidationSubmissionNotFound": {
                    "$ref": "#/components/examples/ValidationSubmissionDocument.ValidationSubmissionNotFound"
                  },
                  "IncorrectParamsBody": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "InvalidConfiguration": {
                    "$ref": "#/components/examples/ValidationSubmission.InvalidConfiguration"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/validation-submissions": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Validation Submissions",
        "tags": [
          "Validation Submissions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/direction"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "in": "query",
            "name": "status",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processed",
                "failed",
                "succeeded"
              ]
            },
            "description": "Filter by Validation Submission status"
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pending",
                  "processed",
                  "failed",
                  "succeeded"
                ]
              }
            },
            "description": "Filter by multiple statuses"
          },
          {
            "in": "query",
            "name": "configurationIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by multiple configuration ids"
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string",
              "description": "Filter by agent verification email"
            }
          },
          {
            "in": "query",
            "name": "validationRequestIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by validation request ids"
            }
          },
          {
            "in": "query",
            "name": "organisationIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by organisation ids"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search by agent verification email, organisation name or validation request name",
            "example": "example@example.com"
          },
          {
            "in": "query",
            "name": "countryCodes",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by 3-letter ISO country code"
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter submissions created on or after this date",
            "example": "2025-01-01T00:00:00.000Z"
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter submissions created on or before this date",
            "example": "2025-12-31T23:59:59.000Z"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved list of Validation Submissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ValidationSubmission"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "agentVerificationEmail": {
                                "type": "string",
                                "deprecated": true,
                                "nullable": true
                              },
                              "agentVerificationFirstName": {
                                "type": "string",
                                "deprecated": true,
                                "nullable": true
                              },
                              "agentVerificationLastName": {
                                "type": "string",
                                "deprecated": true,
                                "nullable": true
                              }
                            }
                          }
                        ]
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_submission"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Validation Submission",
        "tags": [
          "Validation Submissions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "configurationId": {
                        "type": "string",
                        "description": "Id of the Validation Submission Configuration associated with submission",
                        "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "organisationName": {
                        "type": "string",
                        "description": "Name of organisation",
                        "maxLength": 255
                      },
                      "registryName": {
                        "type": "string",
                        "description": "Name of organisation's registry",
                        "maxLength": 255
                      },
                      "registryId": {
                        "type": "string",
                        "description": "Organisations's id in registry"
                      },
                      "organisationEmail": {
                        "type": "string",
                        "description": "Organisation's email",
                        "example": "test@goodstack.internal",
                        "maxLength": 255
                      },
                      "addressLine1": {
                        "type": "string",
                        "description": "Organisation's address line 1",
                        "example": "44 Clipstone St",
                        "maxLength": 255
                      },
                      "addressLine2": {
                        "type": "string",
                        "description": "Organisation's address line 2",
                        "example": "House 40, Threeways",
                        "maxLength": 255
                      },
                      "city": {
                        "type": "string",
                        "description": "Organisation's city",
                        "example": "London",
                        "maxLength": 255
                      },
                      "postal": {
                        "type": "string",
                        "description": "Organisation's postal code",
                        "example": "W1W 5DW",
                        "maxLength": 255
                      },
                      "state": {
                        "type": "string",
                        "description": "Organisation's state",
                        "example": "Texas",
                        "maxLength": 255
                      },
                      "website": {
                        "type": "string",
                        "description": "Organisation's website",
                        "format": "website",
                        "example": "https://example.com",
                        "maxLength": 255
                      },
                      "countryCode": {
                        "type": "string",
                        "description": "Three-letter ISO country code",
                        "example": "POL"
                      },
                      "firstName": {
                        "type": "string",
                        "description": "First name of Agent",
                        "example": "Max",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "description": "Last name of Agent",
                        "example": "Plank",
                        "maxLength": 255
                      },
                      "email": {
                        "type": "string",
                        "description": "Email of Agent",
                        "example": "test@goodstack.internal",
                        "maxLength": 255
                      },
                      "title": {
                        "type": "string",
                        "example": "Board Member",
                        "description": "Agent's job title",
                        "maxLength": 255
                      },
                      "language": {
                        "type": "string",
                        "description": "Valid RFC 5646 language code",
                        "example": "en-GB"
                      },
                      "metadata": {
                        "description": "Metadata object.",
                        "type": "object",
                        "maxProperties": 20,
                        "additionalProperties": {
                          "description": "Max key size is 40 characters",
                          "type": "string",
                          "maxLength": 250
                        }
                      }
                    },
                    "required": [
                      "organisationName",
                      "registryName",
                      "registryId",
                      "website",
                      "countryCode",
                      "language"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "configurationId": {
                        "type": "string",
                        "description": "Id of the Validation Submission Configuration",
                        "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "organisationId": {
                        "type": "string",
                        "description": "OrganisationId of the Agent",
                        "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "firstName": {
                        "type": "string",
                        "description": "First name of Agent",
                        "example": "Max",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "description": "Last name of Agent",
                        "example": "Plank",
                        "maxLength": 255
                      },
                      "email": {
                        "type": "string",
                        "description": "Email of Agent",
                        "example": "test@goodstack.internal",
                        "maxLength": 255
                      },
                      "title": {
                        "type": "string",
                        "example": "Board Member",
                        "description": "Agent's job title",
                        "maxLength": 255
                      },
                      "website": {
                        "type": "string",
                        "description": "Organization's website",
                        "format": "website",
                        "example": "https://goodstack.internal",
                        "maxLength": 255
                      },
                      "language": {
                        "type": "string",
                        "description": "Valid RFC 5646 language code",
                        "example": "en-GB"
                      },
                      "metadata": {
                        "description": "Metadata object.",
                        "type": "object",
                        "maxProperties": 20,
                        "additionalProperties": {
                          "description": "Max key size is 40 characters. If key matches already existing key, it will override old value",
                          "type": "string",
                          "maxLength": 250
                        }
                      }
                    },
                    "required": [
                      "organisationId",
                      "language"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Validation Submission",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SingleApiValidationSubmission"
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_submission"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "OrganisationNotFound": {
                    "$ref": "#/components/examples/ValidationSubmission.OrganisationNotFound"
                  },
                  "OrganisationNotActive": {
                    "$ref": "#/components/examples/ValidationSubmission.OrganisationNotActive"
                  },
                  "ValidationSubmissionDocumentNotFound": {
                    "$ref": "#/components/examples/ValidationSubmission.ValidationSubmissionDocumentNotFound"
                  },
                  "ValidationRequestNotFound": {
                    "$ref": "#/components/examples/ValidationSubmission.ValidationRequestNotFound"
                  },
                  "ValidationRequestAlreadyRejected": {
                    "$ref": "#/components/examples/ValidationSubmission.ValidationRequestAlreadyRejected"
                  },
                  "EntityNotFound": {
                    "$ref": "#/components/examples/ValidationSubmission.EntityNotFound"
                  },
                  "InvalidSubTags": {
                    "$ref": "#/components/examples/ValidationSubmission.InvalidSubTags"
                  },
                  "InvalidConfiguration": {
                    "$ref": "#/components/examples/ValidationSubmission.InvalidConfiguration"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/validation-submissions/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Validation Submission."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a Validation Submission",
        "tags": [
          "Validation Submissions"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieves a Validation Submission",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ValidationSubmission"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "agentVerificationEmail": {
                              "type": "string",
                              "deprecated": true,
                              "nullable": true
                            },
                            "agentVerificationFirstName": {
                              "type": "string",
                              "deprecated": true,
                              "nullable": true
                            },
                            "agentVerificationLastName": {
                              "type": "string",
                              "deprecated": true,
                              "nullable": true
                            },
                            "agentVerificationRejectionReason": {
                              "type": "string",
                              "nullable": true,
                              "deprecated": true,
                              "enum": [
                                "Validation request failed",
                                "User verification expired",
                                "Identity check failed",
                                "No evidence agent’s email is associated with organisation",
                                "Agent/nonprofit will reapply",
                                "Agent used fake or test email",
                                "No online presence to complete check",
                                "Other"
                              ]
                            },
                            "agentVerificationRejectionReasonCode": {
                              "type": "string",
                              "nullable": true,
                              "deprecated": true,
                              "enum": [
                                "validation_request_failed",
                                "user_verification_expired",
                                "user_failed_percent_review",
                                "invalid_documentation",
                                "invalid_role",
                                "expired_documentation",
                                "reapply",
                                "fake_email_used",
                                "no_online_presence",
                                "fake_documentation",
                                "mismatched_information",
                                "blank_corrupted_documentation",
                                "suspicious_application",
                                "other"
                              ]
                            },
                            "agentVerificationStatus": {
                              "type": "string",
                              "deprecated": true,
                              "enum": [
                                "pending",
                                "pending_user_verification",
                                "pending_review",
                                "approved",
                                "rejected"
                              ]
                            },
                            "validationRequestAcceptedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-02-02T17:46:54.000Z",
                              "nullable": true,
                              "deprecated": true
                            },
                            "validationRequestRejectedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-02-02T17:46:54.000Z",
                              "nullable": true,
                              "deprecated": true
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-submissions/{id}/documents": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Validation Submission."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Get Validation Submission Documents",
        "tags": [
          "Validation Submission Documents"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved list of Validation Submissions Documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ValidationSubmissionDocumentWithoutValidationInviteId"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "validationInviteId": {
                                "type": "string",
                                "example": "validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                "nullable": true
                              }
                            }
                          }
                        ]
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "validation_submission_document"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/webhook-subscriptions": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Webhook Subscriptions",
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "deleted",
            "schema": {
              "type": "boolean",
              "example": true
            },
            "required": false,
            "description": "Shows deleted Webhook Subscriptions"
          },
          {
            "in": "query",
            "name": "event",
            "schema": {
              "$ref": "#/components/schemas/WebhookEventsEnum"
            },
            "description": "Filter by event",
            "example": "validation_request.rejected",
            "required": false
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully lists Webhook Subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "webhook_subscription"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Webhook Subscription",
        "description": "Create a Webhook Subscription. Specify the event types to subscribe to and the URL where the notifications will be sent, the URL must be https.",
        "tags": [
          "Webhook Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "events": {
                    "$ref": "#/components/schemas/WebhookEventsArray",
                    "description": "Events to subscribe to"
                  },
                  "url": {
                    "description": "URL to which notifications should be sent (https only)",
                    "type": "string",
                    "format": "website",
                    "example": "https://example.com/webhooks"
                  }
                },
                "required": [
                  "eventType",
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Webhook Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "webhook_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Webhook Subscription."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a Webhook Subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieves a Webhook Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "webhook_subscription"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Edit a Webhook Subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "website",
                    "example": "https://example.com/webhooks",
                    "description": "URL to which notifications should be sent (https only)"
                  },
                  "events": {
                    "$ref": "#/components/schemas/WebhookEventsArray",
                    "description": "Events to subscribe to"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully edited a Webhook Subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "object": {
                      "type": "string",
                      "example": "webhook_subscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Delete a Webhook Subscription",
        "tags": [
          "Webhook Subscriptions"
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted a Webhook Subscription"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/donation-sessions": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Donation Sessions",
        "tags": [
          "Donation Sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/direction"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully lists Donation Sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DonationSession"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "donation_session"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Donation Session",
        "description": "To create a Donation Session you must supply the `organisationId` of the nonprofit you want to let your user donate to.\n\nAfter creating the Donation Session, direct your user to the URL for the hosted Donation gateway returned in the response. Your user will receive an email receipt after a successful Donation.\n\nThe status field of the Donation Session object after creation will be `open`. After a successful Donation is made the status will transition to `completed` otherwise if no Donation is completed before the `expiresAt` time the status will be `expired`.\n",
        "tags": [
          "Donation Sessions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organisationId": {
                    "description": "Organisation that can be donated to during Donation session.",
                    "type": "string",
                    "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                  },
                  "successUrl": {
                    "description": "Optional URL the donor will be directed to after making a Donation.",
                    "type": "string",
                    "example": "https://example.com/donation-completed"
                  },
                  "userId": {
                    "description": "Id of the User who this donation belongs to, if one exists.",
                    "type": "string",
                    "example": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                  },
                  "metadata": {
                    "type": "object",
                    "description": "[Key-value data](/#section/Formats/Metadata) that you can attach to a DonationSession. When a Donation is created from a DonationSession, the DonationSession copies its metadata to the Donation.\n",
                    "example": {
                      "key1": "value1",
                      "key2": "value2"
                    }
                  },
                  "language": {
                    "description": "Donation session's default language",
                    "type": "string",
                    "enum": [
                      "en-US",
                      "en-GB",
                      "en-IE",
                      "en-NZ",
                      "de-DE",
                      "de-CH",
                      "de-AT",
                      "fr-FR",
                      "fr-BE",
                      "it-IT",
                      "nl-NL",
                      "sv-SE",
                      "da-DK",
                      "pl-PL",
                      "en-AU",
                      "fr-CA",
                      "en-CA",
                      "es-ES",
                      "ja-JP",
                      "es-MX",
                      "ko-KR",
                      "pt-BR",
                      "en-SG",
                      "ms-MY",
                      "th-TH",
                      "id-ID",
                      "vi-VN",
                      "hu-HU",
                      "cs-CZ",
                      "ro-RO",
                      "fil-PH",
                      "tr-TR"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "example": "GBP",
                    "description": "3-letter currency code"
                  }
                },
                "required": [
                  "organisationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Donation Session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DonationSession"
                    },
                    "object": {
                      "type": "string",
                      "example": "donation_session"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "OrganisationNotFound": {
                    "$ref": "#/components/examples/DonationSession.OrganisationNotFound"
                  },
                  "InvalidMetadata": {
                    "$ref": "#/components/examples/DonationSession.InvalidMetadata"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/donation-sessions/{id}": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve donation session",
        "tags": [
          "Donation Sessions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Id of the donation session to retrieve."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a donation session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DonationSession"
                    },
                    "object": {
                      "type": "string",
                      "example": "donation_session"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/donation-sessions/{sessionId}/donations": {
      "patch": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Update donor details for donation session",
        "description": "Updates the email address, name, consent preferences, and/or gift note for any donations linked to the specified donation session.\nThis endpoint requires both a public API key and a valid donation session token in the headers.\nAt least one field (email, firstName, lastName, consentedToBeContactedByOrg, or giftNote) must be provided in the request body.\nIf no donation is linked to the session, the endpoint will return success without making any changes.\n",
        "tags": [
          "Donation Sessions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Id of the donation session whose linked donations should be updated.",
            "example": "donation_session_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          {
            "in": "header",
            "name": "donation-session-token",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Valid donation session token for authentication."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "New email address for the donor",
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "example": "donor@example.com"
                  },
                  "firstName": {
                    "description": "New first name for the donor",
                    "type": "string",
                    "maxLength": 255,
                    "example": "John"
                  },
                  "lastName": {
                    "description": "New last name for the donor",
                    "type": "string",
                    "maxLength": 255,
                    "example": "Doe"
                  },
                  "consentedToBeContactedByOrg": {
                    "description": "Whether the donor consents to be contacted by the organization",
                    "type": "string",
                    "enum": [
                      "yes",
                      "no"
                    ],
                    "example": "yes"
                  },
                  "giftNote": {
                    "description": "Optional personal message from the donor to the organisation receiving the gift",
                    "type": "string",
                    "maxLength": 500,
                    "example": "Happy Birthday! Hope this helps with your amazing work."
                  }
                },
                "minProperties": 1,
                "additionalProperties": false
              },
              "examples": {
                "UpdateEmail": {
                  "summary": "Update email only",
                  "value": {
                    "email": "newemail@example.com"
                  }
                },
                "UpdateFirstName": {
                  "summary": "Update first name only",
                  "value": {
                    "firstName": "Jane"
                  }
                },
                "UpdateLastName": {
                  "summary": "Update last name only",
                  "value": {
                    "lastName": "Smith"
                  }
                },
                "UpdateConsent": {
                  "summary": "Update consent only",
                  "value": {
                    "consentedToBeContactedByOrg": "no"
                  }
                },
                "UpdateGiftNote": {
                  "summary": "Update gift note only",
                  "value": {
                    "giftNote": "Thank you for your incredible work helping families in need!"
                  }
                },
                "UpdateMultipleFields": {
                  "summary": "Update multiple fields",
                  "value": {
                    "email": "updated@example.com",
                    "firstName": "John",
                    "lastName": "Doe",
                    "consentedToBeContactedByOrg": "yes",
                    "giftNote": "With love and gratitude for all you do!"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated donor details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "updated": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "donation_session"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "MissingFields": {
                    "summary": "At least one field required",
                    "value": {
                      "error": {
                        "code": "bad_request",
                        "message": "At least one field (email, consentedToBeContactedByOrg, firstName, or lastName) must be provided",
                        "title": "Bad request"
                      }
                    }
                  },
                  "InvalidEmail": {
                    "summary": "Invalid email format",
                    "value": {
                      "error": {
                        "code": "bad_request",
                        "message": "Invalid email",
                        "title": "Bad request"
                      }
                    }
                  },
                  "InvalidConsent": {
                    "summary": "Invalid consent value",
                    "value": {
                      "error": {
                        "code": "bad_request",
                        "message": "Invalid enum value. Expected 'yes' | 'no', received 'maybe'",
                        "title": "Bad request"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden - missing donation session token or invalid scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "ForbiddenScope": {
                    "$ref": "#/components/examples/ForbiddenScope"
                  },
                  "MissingToken": {
                    "summary": "Missing donation session token",
                    "value": {
                      "error": {
                        "code": "donation_session/donation_session_token_missing",
                        "message": "Donation session token missing",
                        "title": "Forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/donations": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "List Donations",
        "description": "Retrieve a list of donations.\n\nPII fields (`firstName`, `lastName` & `email`) will be included or excluded depending on your partner settings.\n",
        "tags": [
          "Donations"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "example": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            },
            "required": false,
            "description": "Filter results by userId."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "REQUESTED_PAYMENT",
                "RECEIVED_PAYMENT",
                "DISBURSED",
                "CANCELLED"
              ]
            },
            "required": false,
            "description": "Filter results by status."
          },
          {
            "in": "query",
            "name": "kinds",
            "schema": {
              "type": "string",
              "enum": [
                "hosted",
                "direct",
                "matched",
                "external",
                "wallet",
                "payroll"
              ]
            },
            "required": false,
            "description": "Filter results by donation kind."
          },
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "string",
              "enum": [
                "grant",
                "corporate_donation",
                "consumer_giving",
                "employee_impact",
                "unclassified"
              ]
            },
            "required": false,
            "description": "Filter results by donation category. Accepts one or more values.\nUse `unclassified` to include donations that have no category assigned.\n"
          },
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Start date to retrieve users donations from.",
            "example": "2020-10-13T17:46:54.000Z"
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "End date to retrieve users donations from.",
            "example": "2020-10-13T17:46:54.000Z"
          },
          {
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            },
            "required": false,
            "description": "Filter results by organisationId."
          },
          {
            "in": "query",
            "name": "excludeImported",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "When true, exclude donations that have an import date."
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully listed Donations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/DonationDirect"
                          },
                          {
                            "$ref": "#/components/schemas/DonationHosted"
                          }
                        ]
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "donation"
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/CursorLinks"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "CursorError": {
                    "$ref": "#/components/examples/Pagination.CursorError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      },
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a donation",
        "description": "Creates a new Donation of type `direct`. We will request payment from you for the Donations aggregated over a period. Goodstack and our associated foundations will then handle the ongoing safe and efficient disbursement of funds to the nonprofit.\n\nPlease note that if you are creating with a `userId` and no `organisationId` the user must be already [supporting an organisation](#operation/SupportOrganisation).\n",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Idempotency key."
          }
        ],
        "tags": [
          "Donations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "title": "DirectDonation with Organisation ID",
                    "properties": {
                      "amount": {
                        "description": "Amount to be donated. A positive integer representing how much to donate in the smallest currency unit, for example 100 pence to donate £1.00.",
                        "type": "integer",
                        "example": 120
                      },
                      "currencyCode": {
                        "description": "Three-letter ISO currency code. Only currency codes supported by our foundations will be accepted.",
                        "type": "string",
                        "example": "GBP"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "subsidiaryId": {
                        "type": "string",
                        "example": "subsidiary_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "firstName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "consentedToBeContactedByOrg": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no"
                        ]
                      },
                      "anonymous": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no"
                        ]
                      },
                      "metadata": {
                        "type": "object",
                        "description": "[Key-value data](/#section/Formats/Metadata) that you can attach to a Donation.\n",
                        "example": {
                          "key1": "value1",
                          "key2": "value2"
                        }
                      },
                      "giftNote": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "Optional gift note message to accompany the donation",
                        "example": "Happy Birthday!"
                      },
                      "category": {
                        "type": "string",
                        "description": "Assign donation to a specific category",
                        "enum": [
                          "consumer_giving",
                          "grant",
                          "employee_impact",
                          "corporate_donation"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currencyCode",
                      "organisationId"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "DirectDonation with User ID",
                    "properties": {
                      "amount": {
                        "type": "integer",
                        "example": 120
                      },
                      "currencyCode": {
                        "description": "Three-letter ISO currency code.",
                        "type": "string",
                        "example": "GBP"
                      },
                      "userId": {
                        "type": "string",
                        "example": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "subsidiaryId": {
                        "type": "string",
                        "example": "subsidiary_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                      },
                      "firstName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "lastName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "consentedToBeContactedByOrg": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no"
                        ]
                      },
                      "anonymous": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no"
                        ]
                      },
                      "metadata": {
                        "type": "object",
                        "description": "[Key-value data](/#section/Formats/Metadata) that you can attach to a Donation.\n",
                        "example": {
                          "key1": "value1",
                          "key2": "value2"
                        }
                      },
                      "giftNote": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "Optional gift note message to accompany the donation",
                        "example": "Happy Birthday!"
                      },
                      "category": {
                        "type": "string",
                        "description": "Assign donation to a specific category",
                        "enum": [
                          "consumer_giving",
                          "grant",
                          "employee_impact",
                          "corporate_donation"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currencyCode",
                      "userId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a Donation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DonationDirect"
                    },
                    "object": {
                      "type": "string",
                      "example": "donation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "UserNotFound": {
                    "$ref": "#/components/examples/Donations.UserNotFound"
                  },
                  "MissingOrganisation": {
                    "$ref": "#/components/examples/Donations.MissingOrganisation"
                  },
                  "WrongTargetCurrency": {
                    "$ref": "#/components/examples/Donations.WrongTargetCurrency"
                  },
                  "WrongPartnerCurrency": {
                    "$ref": "#/components/examples/Donations.WrongPartnerCurrency"
                  },
                  "CannotAcceptDonations": {
                    "$ref": "#/components/examples/Donations.CannotAcceptDonations"
                  },
                  "GiftAidMissing": {
                    "$ref": "#/components/examples/Donations.GiftAidMissing"
                  },
                  "OriginalCallInProgress": {
                    "$ref": "#/components/examples/Idempotency.OriginalCallInProgress"
                  },
                  "SameKeyDifferentData": {
                    "$ref": "#/components/examples/Idempotency.SameKeyDifferentData"
                  },
                  "KeyInUse": {
                    "$ref": "#/components/examples/Idempotency.KeyInUse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/donations/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Donation."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a Donation",
        "description": "Retrieve a donation by its ID.\n\nPII fields (`firstName`, `lastName` & `email`) will be included or excluded depending on your partner settings.\n",
        "tags": [
          "Donations"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieves a Donation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/DonationDirect"
                        },
                        {
                          "$ref": "#/components/schemas/DonationHosted"
                        }
                      ]
                    },
                    "object": {
                      "type": "string",
                      "example": "donation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Edit a Donation",
        "description": "Update the recipient organisation, metadata of a Donation. The recipient organisation can only be changed for `direct` type Donations created directly through the [Create A Donation API](./create-a-donation) that are in an `ACTIVE` status.\n",
        "tags": [
          "Donations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organisationId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "description": "[Key-value data](/#section/Formats/Metadata) that you can attach to a Donation.\n",
                    "example": {
                      "key1": "value1",
                      "key2": "value2"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully edited a particular donation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DonationDirect"
                    },
                    "object": {
                      "type": "string",
                      "example": "donation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "InvalidState": {
                    "$ref": "#/components/examples/Donations.InvalidState"
                  },
                  "InvalidMetadata": {
                    "$ref": "#/components/examples/Donations.InvalidMetadata"
                  },
                  "InvalidTypeForEditOrganisation": {
                    "$ref": "#/components/examples/Donations.InvalidTypeForEditOrganisation"
                  },
                  "MissingOrganisation": {
                    "$ref": "#/components/examples/Donations.MissingOrganisation"
                  },
                  "WrongTargetCurrency": {
                    "$ref": "#/components/examples/Donations.WrongTargetCurrency"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/donations/{id}/cancel": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "integer"
          },
          "required": true,
          "description": "Id of the Donation to cancel."
        }
      ],
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Cancel a Donation",
        "description": "Applicable only to `direct` type Donations created directly through the [Create A Donation API](./create-a-donation).\n",
        "tags": [
          "Donations"
        ],
        "responses": {
          "200": {
            "description": "Successfully cancelled a Donation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DonationDirect"
                    },
                    "object": {
                      "type": "string",
                      "example": "donation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "InvalidState": {
                    "$ref": "#/components/examples/Donations.InvalidState"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/gift-aid": {
      "post": {
        "summary": "Create a GiftAid Declaration",
        "tags": [
          "Gift Aid"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "firstName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "buildingNameNumber": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "roadName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "postcode": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "required": [
                  "title",
                  "fullName",
                  "lastName",
                  "buildingNameNumber",
                  "roadName",
                  "city",
                  "country",
                  "postcode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a GiftAid declaration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GiftAid"
                    },
                    "object": {
                      "type": "string",
                      "example": "gift_aid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "UserNotFound": {
                    "$ref": "#/components/examples/GiftAid.UserNotFound"
                  },
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/users": {
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a User",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "Successfully created a User",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    },
                    "object": {
                      "type": "string",
                      "example": "user"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/users/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "integer"
          },
          "required": true,
          "description": "Id of the user"
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve a User",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a User",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    },
                    "object": {
                      "type": "string",
                      "example": "user"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/users/{id}/organisation": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the User."
        }
      ],
      "put": {
        "operationId": "SupportOrganisation",
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Set User to support an Organisation",
        "description": "For Donations created through the [Create A Donation API](./create-a-donation), A User can be set to donate to a particular Organisation by default using this API. If a Donation is made with a userId, the Donation will be associated with the Organisation the User is supporting at the time of Donation. If the userId is omitted or the User has not been set to donate to an Organisation by default then the organisationId must be included in the body.\n",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organisationId": {
                    "type": "string",
                    "description": "Organisation id to support."
                  }
                },
                "required": [
                  "organisationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully set User to support an Organisation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserOrganisation"
                    },
                    "object": {
                      "type": "string",
                      "example": "UserOrganisation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "BadRequest": {
                    "$ref": "#/components/examples/BadRequest"
                  },
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/users/{id}/has-gift-aid": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "integer"
          },
          "required": true,
          "description": "Id of the user."
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "tags": [
          "Gift Aid"
        ],
        "summary": "Retrieve GiftAid id for User",
        "description": "Returns the most recent gift aid id for a given user, returns 404 not found if no gift aid exists.",
        "responses": {
          "200": {
            "description": "Successfully retrieved GiftAid id for User",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "giftaid_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/experience/organisations/{id}/default-locale": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Get default locale for an organisation",
        "tags": [
          "Experience"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The ID of the organisation",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the default locale",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganisationDefaultLocale"
                    },
                    "object": {
                      "type": "string",
                      "example": "organisation_default_locale"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/experience/organisations/{id}/images": {
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          },
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Get organisation images for organisation",
        "tags": [
          "Experience"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The ID of the organisation",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved organisation images",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrganisationImage"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "organisation_image"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "summary": "Upload organisation image",
        "tags": [
          "Experience"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The ID of the organisation",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The banner image file (JPG, JPEG, or PNG, max 2MB)"
                  },
                  "description": {
                    "type": "string",
                    "description": "Image description",
                    "maxLength": 255
                  },
                  "imageValidationConfigurationId": {
                    "type": "string",
                    "description": "Id of image validation configuration to apply"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully uploaded organisation image",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganisationImage"
                    },
                    "object": {
                      "type": "string",
                      "example": "organisation_image"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "IncorrectParams": {
                    "$ref": "#/components/examples/IncorrectParams"
                  },
                  "Experience.OrganisationImage.ImageValidationConfigurationNotFound": {
                    "$ref": "#/components/examples/Experience.OrganisationImage.ImageValidationConfigurationNotFound"
                  },
                  "Experience.OrganisationImage.ImageDimensionsInvalid": {
                    "$ref": "#/components/examples/Experience.OrganisationImage.ImageDimensionsInvalid"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/branding/organisations/{organisationId}": {
      "get": {
        "summary": "Get organisation branding",
        "description": "Retrieve branding information for a specific organisation",
        "tags": [
          "Organisation Branding"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the organisation",
            "schema": {
              "type": "string",
              "pattern": "^organisation_[a-zA-Z0-9_]+$",
              "example": "organisation_xxxxxxxx"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved organisation branding",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganisationBrandingResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/scim/v2/Users": {
      "get": {
        "summary": "List users",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Return a paginated, optionally filtered and sorted list of users that\nbelong to the partner the SCIM key is bound to. The response is a SCIM\nListResponse envelope.\n",
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "SCIM filter expression, e.g. `userName eq \"johndoe@example.com\"`.\nString comparison values must be quoted. Supports logical operators\n(`and`, `or`, `not`), grouping and value paths.\n",
            "example": "userName eq \"johndoe@example.com\""
          },
          {
            "in": "query",
            "name": "startIndex",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "1-based index of the first result to return."
          },
          {
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            },
            "description": "Maximum number of results to return (max 100)."
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Attribute to sort by, e.g. `userName`. Unknown attributes are ignored."
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ascending",
                "descending"
              ],
              "default": "ascending"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM list of users.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ScimBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          }
        }
      },
      "post": {
        "summary": "Create a user",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Provision a new user for the partner the SCIM key is bound to.",
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ScimUser"
                  },
                  {
                    "type": "object",
                    "required": [
                      "schemas",
                      "userName"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created user.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimUser"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ScimBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "409": {
            "$ref": "#/components/responses/ScimConflict"
          }
        }
      }
    },
    "/scim/v2/Users/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The unique identifier of the user (account id).",
          "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
      ],
      "get": {
        "summary": "Retrieve a user",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Retrieve a single user by id. The user must belong to the partner the SCIM key is bound to.",
        "responses": {
          "200": {
            "description": "The requested user.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimUser"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ScimNotFound"
          }
        }
      },
      "put": {
        "summary": "Replace a user",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Replace a user's attributes. Attributes omitted from the request are\ncleared. `userName` (email) and other fields are validated; an invalid\nemail returns `400`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ScimUser"
                  },
                  {
                    "type": "object",
                    "required": [
                      "schemas",
                      "userName"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated user.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimUser"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ScimBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ScimNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ScimConflict"
          }
        }
      },
      "patch": {
        "summary": "Update a user",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Apply a SCIM PATCH operation set to a user.",
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schemas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "urn:ietf:params:scim:api:messages:2.0:PatchOp"
                    ]
                  },
                  "Operations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "op": {
                          "type": "string",
                          "enum": [
                            "add",
                            "replace",
                            "remove"
                          ],
                          "example": "replace"
                        },
                        "path": {
                          "type": "string",
                          "description": "Attribute path to modify. May be namespaced for\nextensions, e.g.\n`urn:ietf:params:scim:schemas:extension:goodstack:2.0:User:startDate`.\n",
                          "example": "name.formatted"
                        },
                        "value": {
                          "description": "The new value. Type depends on the target attribute.",
                          "example": "John Doe"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "schemas",
                  "Operations"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated user.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimUser"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ScimBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ScimNotFound"
          }
        }
      },
      "delete": {
        "summary": "Deactivate a user",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Soft-delete (deactivate) a user. The user must belong to the partner the SCIM key is bound to.",
        "responses": {
          "204": {
            "description": "The user was deactivated."
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ScimNotFound"
          }
        }
      }
    },
    "/scim/v2/Bulk": {
      "post": {
        "summary": "Bulk operations",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Apply up to 100 user operations in a single request. Each operation is a\n`POST`, `PUT`, `PATCH` or `DELETE` against `/Users`. The response is a\nSCIM BulkResponse; per-operation failures are reported inline and do not\nfail the whole request unless `failOnErrors` is reached.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schemas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
                    ]
                  },
                  "failOnErrors": {
                    "type": "integer",
                    "description": "Stop processing after this many errors.",
                    "example": 1
                  },
                  "Operations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE"
                          ]
                        },
                        "bulkId": {
                          "type": "string",
                          "description": "Client-supplied temporary id for POST operations."
                        },
                        "path": {
                          "type": "string",
                          "example": "/Users"
                        },
                        "data": {
                          "type": "object",
                          "description": "The user payload or PATCH op set for the operation."
                        }
                      }
                    }
                  }
                },
                "required": [
                  "schemas",
                  "Operations"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A SCIM bulk response.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "urn:ietf:params:scim:api:messages:2.0:BulkResponse"
                      ]
                    },
                    "Operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "method": {
                            "type": "string",
                            "example": "POST"
                          },
                          "bulkId": {
                            "type": "string"
                          },
                          "location": {
                            "type": "string",
                            "example": "https://api.goodstack.io/scim/v2/Users/account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                          },
                          "status": {
                            "type": "string",
                            "example": "201"
                          },
                          "response": {
                            "$ref": "#/components/schemas/ScimError"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "413": {
            "description": "The number of operations exceeds the maximum (100).",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimError"
                },
                "example": {
                  "schemas": [
                    "urn:ietf:params:scim:api:messages:2.0:Error"
                  ],
                  "status": "413",
                  "detail": "Number of operations in BulkRequest exceeds maxOperations limit (100)"
                }
              }
            }
          }
        }
      }
    },
    "/scim/v2/Schemas": {
      "get": {
        "summary": "List supported schemas",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Discovery endpoint listing the supported SCIM schemas: the Core User,\nthe Enterprise User extension and the Goodstack User extension. Truncated\nattributes are excluded.\n",
        "responses": {
          "200": {
            "description": "A SCIM list of schema definitions.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          }
        }
      }
    },
    "/scim/v2/Schemas/{id}": {
      "get": {
        "summary": "Retrieve a schema",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Retrieve a single schema definition by its URN.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The schema URN.",
            "examples": {
              "coreUser": {
                "value": "urn:ietf:params:scim:schemas:core:2.0:User"
              },
              "enterpriseUser": {
                "value": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
              },
              "goodstackUser": {
                "value": "urn:ietf:params:scim:schemas:extension:goodstack:2.0:User"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A SCIM schema definition.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ScimNotFound"
          }
        }
      }
    },
    "/scim/v2/ResourceTypes": {
      "get": {
        "summary": "List resource types",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Discovery endpoint listing the supported resource types. The `User`\nresource type advertises the Enterprise User and Goodstack User\nextensions under `schemaExtensions`.\n",
        "responses": {
          "200": {
            "description": "A SCIM list of resource types.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          }
        }
      }
    },
    "/scim/v2/ServiceProviderConfig": {
      "get": {
        "summary": "Retrieve service provider configuration",
        "security": [
          {
            "SCIMBearer": []
          }
        ],
        "tags": [
          "SCIM"
        ],
        "description": "Discovery endpoint describing the SCIM features supported by the service\nprovider (patch, bulk, filter, sort, change password, etag and\nauthentication schemes).\n",
        "responses": {
          "200": {
            "description": "The SCIM service provider configuration.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ScimUnauthorized"
          }
        }
      }
    },
    "/v1/monetary-donation-verifications": {
      "post": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Create a Monetary Donation Verification",
        "description": "Creates a new monetary donation verification for a partner.",
        "tags": [
          "Monetary Donation Verifications"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "configurationId",
                  "organisation"
                ],
                "properties": {
                  "configurationId": {
                    "type": "string",
                    "example": "911b7e0d-244b-428a-80c6-6fbd4519f1cc",
                    "description": "Monetary Donation Verification Configuration ID"
                  },
                  "contactInformation": {
                    "type": "array",
                    "minItems": 0,
                    "items": {
                      "type": "object",
                      "properties": {
                        "firstName": {
                          "type": "string",
                          "example": "John",
                          "description": "Contact first name (optional)"
                        },
                        "lastName": {
                          "type": "string",
                          "example": "Doe",
                          "description": "Contact last name (optional)"
                        },
                        "primaryEmail": {
                          "type": "string",
                          "format": "email",
                          "example": "john.doe@example.com",
                          "description": "Contact primary email (optional)"
                        },
                        "contactNumber": {
                          "type": "string",
                          "nullable": true,
                          "example": "+1234567890",
                          "description": "Contact phone number (optional)"
                        }
                      }
                    },
                    "description": "Contact information for the verification (optional, can be omitted or empty array)"
                  },
                  "organisation": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "known"
                            ],
                            "example": "known"
                          },
                          "id": {
                            "type": "string",
                            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                            "description": "Organisation ID"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created a Monetary Donation Verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "038bae12-0973-47e7-9f37-b6780dadba6b",
                          "description": "Monetary Donation Verification ID"
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "monetary_donation_verification"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/monetary-donation-verifications/{id}": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Get a Monetary Donation Verification by ID",
        "description": "Retrieves a monetary donation verification by its ID for the authenticated partner.",
        "tags": [
          "Monetary Donation Verifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Monetary Donation Verification ID (UUID v7)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the Monetary Donation Verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Monetary Donation Verification ID"
                        },
                        "configurationId": {
                          "type": "string",
                          "description": "Monetary Donation Verification Configuration ID"
                        },
                        "organisationId": {
                          "type": "string",
                          "nullable": true,
                          "description": "Organisation ID"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "approved",
                                "rejected",
                                "expired"
                              ]
                            },
                            "reasons": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Only present when status type is rejected"
                            },
                            "awaitingAnswerFromOrganisation": {
                              "type": "boolean",
                              "description": "Only present when status type is pending"
                            }
                          }
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "monetary_donation_verification"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/organisations": {
      "parameters": [
        {
          "in": "query",
          "name": "countryCode",
          "schema": {
            "type": "string"
          },
          "description": "Filter search by three-letter ISO country code"
        },
        {
          "in": "query",
          "name": "administrativeArea",
          "schema": {
            "type": "string"
          },
          "required": false,
          "description": "Narrow results to an administrative area (state / province / county) within the `countryCode`, which is required when this is set. Send the area name — e.g. `California`, `Ontario`, `Kent`, `Aberdeen City`. US and Canada also accept a subdivision code (`US-CA`, `CA-ON`). Unrecognised values match nothing.\n"
        },
        {
          "in": "query",
          "name": "excludeCountryCodes",
          "schema": {
            "type": "string"
          },
          "required": false,
          "description": "Comma-separated list of 3 character country codes to exclude from results. Only applies when countryCode is not provided (global search). Example: \"CHN\" or \"CHN,IRN,PRK\"\n"
        },
        {
          "in": "query",
          "name": "registryId",
          "schema": {
            "type": "string"
          },
          "description": "Filter search using an organisation’s ID within their registry. Useful with usaGroupExempt param"
        },
        {
          "in": "query",
          "name": "category[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "category_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            }
          },
          "required": false,
          "description": "Only return Organisations in the given Categories",
          "allowReserved": true
        },
        {
          "in": "query",
          "name": "notCategory[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "category_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            }
          },
          "required": false,
          "description": "Do not return Organisations in the given Categories",
          "allowReserved": true
        },
        {
          "in": "query",
          "name": "tags[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "aus-dgr1"
            }
          },
          "required": false,
          "description": "Only return Organisations with the specified tags. To fetch organisations with tag X AND Y use the following `?tags[]=X&tags[]=Y`. To fetch organisations with tag X OR Y use the following `?tags[]=X,Y`. Currently supported tags are ind-fcra, aus-dgr1 and aus-dgr2.",
          "allowReserved": true
        },
        {
          "in": "query",
          "name": "notTags[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "aus-dgr4"
            }
          },
          "required": false,
          "description": "Do not return Organisations with the specified tags. To fetch organisations with tag X AND NOT with Y use the following `?tags[]=X&notTags[]=Y`. To fetch organisations with not include tag X OR Y use the following `?notTags[]=X,Y`. To fetch organisations with not include tag X AND Y use the following `?notTags[]=X&notTags[]=Y`",
          "allowReserved": true
        },
        {
          "in": "query",
          "name": "type[]",
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "nonprofit"
              ]
            }
          },
          "required": false,
          "description": "Restrict search to a single type of organisation.",
          "allowReserved": true
        },
        {
          "in": "query",
          "name": "query",
          "schema": {
            "type": "string",
            "example": "cancer research",
            "maxLength": 500
          },
          "required": false,
          "description": "Search for organisations by name. Must not exceed 500 characters or 512 bytes."
        },
        {
          "in": "query",
          "name": "lat",
          "schema": {
            "type": "number",
            "example": 51.5074,
            "maximum": 90,
            "minimum": -90
          },
          "required": false,
          "description": "Search for organisations by latitude. Must be between -90 and 90. Must be used with lon."
        },
        {
          "in": "query",
          "name": "lon",
          "schema": {
            "type": "number",
            "example": -0.1278,
            "maximum": 180,
            "minimum": -180
          },
          "required": false,
          "description": "Search for organisations by longitude. Must be between -180 and 180. Must be used with lat."
        },
        {
          "in": "query",
          "name": "distance",
          "schema": {
            "type": "string",
            "example": "10km",
            "default": "100km"
          },
          "required": false,
          "description": "Search for organisations within a distance of a point. Can be used with lat and lon. The distance must be a number followed by a unit of measurement (km, m, mi, yd, ft, in, cm, mm, NM or nmi)."
        },
        {
          "in": "query",
          "name": "usaGroupExempt",
          "schema": {
            "type": "boolean"
          },
          "description": "Filter search by USA-specific group exempt. Recommended to use with registryId param",
          "required": false
        },
        {
          "in": "query",
          "name": "domain",
          "schema": {
            "type": "string"
          },
          "description": "Filter search by domain of website or email"
        },
        {
          "$ref": "#/components/parameters/page"
        },
        {
          "$ref": "#/components/parameters/pageSize"
        }
      ],
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Search Organisations",
        "description": "Search for nonprofits. The Organizations Search API provides up to 1,000 results for each search query, accessible via pagination.\n\nThe exhaustiveTotalResults boolean field indicates whether the value of totalResults is exact (true) or approximate (false).\nIf the system determines that the total number of results exceeds 10,000, the exhaustiveTotalResults field is set to false, indicating that totalResults is an approximation and that there are likely more than 10,000 results matching the query.\n\nIf lat/lon coordinates are provided, the top results will be within the specified distance from this location, ranked by closeness. If lat/lon is provided without specifying a distance, a default of 100km will be used. Results outside of this radius this will be ranked by name match without consideration of distance.\n",
        "tags": [
          "Organisations"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a page of organisations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Organisation"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "types": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "nonprofit",
                                    "social_impact",
                                    "education"
                                  ]
                                }
                              },
                              "registryDetails": {
                                "nullable": true,
                                "allOf": [
                                  {
                                    "$ref": "#/components/schemas/Registry"
                                  }
                                ]
                              }
                            }
                          }
                        ]
                      }
                    },
                    "totalResults": {
                      "type": "integer",
                      "example": 33
                    },
                    "pageNumber": {
                      "type": "integer",
                      "example": 1
                    },
                    "pageSize": {
                      "type": "integer",
                      "example": 25
                    },
                    "_links": {
                      "$ref": "#/components/schemas/OffsetLinks"
                    },
                    "exhaustiveTotalResults": {
                      "type": "boolean",
                      "description": "whether the totalResults are exhaustive (true) or approximate (false)"
                    },
                    "object": {
                      "type": "string",
                      "example": "organisation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/organisations/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the organisation"
        }
      ],
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Retrieve an Organisation",
        "tags": [
          "Organisations"
        ],
        "responses": {
          "200": {
            "description": "Retrieve a nonprofit Organisation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Organisation"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "types": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "nonprofit",
                                  "social_impact",
                                  "education"
                                ]
                              }
                            },
                            "registryDetails": {
                              "nullable": true,
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/Registry"
                                }
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "object": {
                      "type": "string",
                      "example": "Organisation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/organisations/{id}/milestones": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the organisation"
        }
      ],
      "get": {
        "security": [
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "List an Organisations Milestones",
        "tags": [
          "Organisations"
        ],
        "responses": {
          "200": {
            "description": "Successfully list an Organisations milestones",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Milestone"
                    },
                    "object": {
                      "type": "string",
                      "example": "milestone"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          }
        }
      }
    },
    "/v1/organisations/{countryCode}/{registry}/{registryId}": {
      "parameters": [
        {
          "in": "path",
          "name": "countryCode",
          "schema": {
            "type": "string"
          },
          "description": "3 letter ISO-3166 alpha 3 identifier of the country",
          "required": true
        },
        {
          "in": "path",
          "name": "registry",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the registry"
        },
        {
          "in": "path",
          "name": "registryId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Organisation within the registry"
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve an Organisation by country code, registry and registryId",
        "tags": [
          "Organisations"
        ],
        "responses": {
          "200": {
            "description": "Retrieve a Organisation by country code, registry and registryId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Organisation"
                    },
                    "object": {
                      "type": "string",
                      "example": "Organisation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/organisations/{id}/profile": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the organisation"
        }
      ],
      "get": {
        "summary": "Retrieve an Organisation profile info",
        "tags": [
          "Organisations"
        ],
        "responses": {
          "200": {
            "description": "Retrieve a nonprofit Organisation profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "Lemon rescue nonprofit"
                        },
                        "displayName": {
                          "type": "string",
                          "example": "Lemon Team",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "example": "Lemon Team",
                          "nullable": true
                        },
                        "logo": {
                          "type": "string",
                          "example": "https://logo-url.com/the-logo.png",
                          "nullable": true
                        },
                        "claimed": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "organisation_profile"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-submission-configurations/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the validation submission configuration"
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Retrieve specific configuration",
        "tags": [
          "Validation Submission Configuration"
        ],
        "responses": {
          "200": {
            "description": "Successfully fetch configurations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/PartnerProgramConfiguration"
                    },
                    "object": {
                      "type": "string",
                      "example": "partner_program_configuration"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenScope"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/activity-tags": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          },
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "List Activity Tags",
        "tags": [
          "Activities"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivityTag"
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "activity_tag"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/activity-tags/{tagId}": {
      "parameters": [
        {
          "in": "path",
          "name": "tagId",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "Id of the Activity Tag"
        }
      ],
      "get": {
        "security": [
          {
            "SecretApiKey": []
          },
          {
            "PublishableApiKey": []
          }
        ],
        "summary": "Retrieve an Activity Tag",
        "tags": [
          "Activities"
        ],
        "responses": {
          "200": {
            "description": "Retrieve an Activity tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ActivityTag"
                    },
                    "object": {
                      "type": "string",
                      "example": "activity_tag"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/validation-submissions-organisations": {
      "get": {
        "security": [
          {
            "SecretApiKey": []
          }
        ],
        "summary": "Search for Validation Submissions with specific org name",
        "tags": [
          "Org name search"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "example": "Great Charity"
            },
            "description": "Filter results by Organisation name"
          },
          {
            "in": "query",
            "name": "validationRequestIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by validation request ids"
            }
          },
          {
            "in": "query",
            "name": "organisationIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by organisation ids"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "Happy Charity",
                                "nullable": false
                              },
                              "organisationId": {
                                "type": "string",
                                "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                "nullable": true
                              },
                              "validationSubmissionId": {
                                "type": "string",
                                "example": "validationsubmission_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                "nullable": false
                              },
                              "validationRequestId": {
                                "type": "string",
                                "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                "nullable": true
                              }
                            }
                          }
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "example": "org_name_search"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/volunteering/external/{appId}/webhook": {
      "post": {
        "summary": "Handle external application webhook event",
        "description": "Webhook endpoint for handling events from external applications (e.g. Goodera).\nCurrently supports the following event types (for Goodera):\n- event.create - Creates a new opportunity\n- event.update - Updates an existing opportunity\n- event.cancel - Cancels an opportunity\n",
        "tags": [
          "Volunteering"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "appId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID of the external application"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Webhook event payload; shape depends on the external application."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook event processed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "nullable": true,
                      "description": "ID of the opportunity. Null if the event was not processed (known, handled edge case or error)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/IncorrectParams"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "An unexpected error occurred while processing the webhook event"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PublishableApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "API key starting with 'pk_' that can be made public"
      },
      "SecretApiKey": {
        "type": "apiKey",
        "in": "header",
        "description": "API key starting with 'sk_' that must be kept secure",
        "name": "Authorization"
      },
      "DonationSessionToken": {
        "type": "apiKey",
        "in": "header",
        "name": "donation-session-token",
        "description": "Donation session token"
      },
      "SCIMBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "SCIM API key issued for the partner, presented as a bearer token in the\n`Authorization` header. The key is bound to a single partner and the\npartner must have the `scim_api` scope enabled. A missing or invalid key\nreturns `401`; a valid key for a partner without the scope also returns\n`401` (`detail: \"scim feature not enabled for this partner\"`).\n"
      }
    },
    "schemas": {
      "Metadata": {
        "type": "object",
        "description": "[Key-value data](/docs/api/goodstack-services#metadata) that you can attach to an object.\n",
        "nullable": true,
        "additionalProperties": {
          "type": "string"
        },
        "example": {
          "key1": "value1",
          "key2": "value2"
        }
      },
      "CursorLinks": {
        "type": "object",
        "properties": {
          "current": {
            "type": "string",
            "example": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D"
          },
          "next": {
            "type": "string",
            "example": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D"
          },
          "prev": {
            "type": "string",
            "example": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D"
          }
        }
      },
      "OffsetLinks": {
        "type": "object",
        "properties": {
          "current": {
            "type": "string",
            "example": "https://.../v1/...?query=climate&page=4"
          },
          "first": {
            "type": "string",
            "example": "https://.../v1/...?query=climate&page=1"
          },
          "last": {
            "type": "string",
            "example": "https://.../v1/...?query=climate&page=9"
          },
          "prev": {
            "type": "string",
            "example": "https://.../v1/...?query=climate&page=3"
          },
          "next": {
            "type": "string",
            "example": "https://.../v1/...?query=climate&page=5"
          }
        }
      },
      "NextLinks": {
        "type": "object",
        "properties": {
          "current": {
            "type": "string",
            "example": "https://.../v1/...?next=ABCD"
          },
          "next": {
            "type": "string",
            "example": "https://.../v1/...?next=ABCD"
          }
        }
      },
      "Category": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "category_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Environmental"
          },
          "imageUrl": {
            "type": "string",
            "example": "categories/3.png",
            "nullable": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "number"
                }
              ]
            },
            "description": "A user-defined record of key-value pairs where the value can be a string, boolean, number, or null.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          }
        }
      },
      "ContentTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the tag",
            "example": "tag_xxx"
          },
          "name": {
            "type": "string",
            "description": "Name of the tag",
            "example": "sustainability"
          },
          "partnerId": {
            "type": "string",
            "description": "Partner the tag belongs to",
            "example": "partner_xxx"
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "URL of the tag image",
            "example": "https://example.com/image.png"
          },
          "type": {
            "type": "string",
            "enum": [
              "label",
              "nonprofit_partner_tag"
            ],
            "description": "Type of the tag",
            "example": "label"
          }
        }
      },
      "Organisation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Green world"
          },
          "displayName": {
            "type": "string",
            "example": "Green world",
            "nullable": true
          },
          "description": {
            "type": "string",
            "example": "Environmental nonprofit supporting various types of wildlife across the northern and southern regions of the eastern southern hemisphere and australasia"
          },
          "countryCode": {
            "type": "string",
            "example": "AUS"
          },
          "milestones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Milestone"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "type": {
            "type": "string",
            "deprecated": true,
            "enum": [
              "nonprofit"
            ]
          },
          "logo": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "url"
            }
          },
          "registry": {
            "type": "string",
            "example": "registry_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "registryId": {
            "type": "string",
            "example": "12-3456789"
          },
          "website": {
            "type": "string",
            "example": "https://example.com",
            "nullable": true
          },
          "websites": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "https://example.com"
            }
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "221b Baker Street, Westminster, London, NW1 6XE"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true,
            "example": "221b Baker Street"
          },
          "addressLine2": {
            "type": "string",
            "nullable": true,
            "example": "Westminster"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "London"
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true,
            "example": "NW1 6XE"
          },
          "registrationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "registrationActive": {
            "type": "boolean",
            "description": "Whether the organisation's registration status is currently active",
            "example": true
          },
          "currencyCode": {
            "type": "string",
            "example": "AUD",
            "nullable": true
          },
          "trustees": {
            "type": "string",
            "nullable": true
          },
          "claimedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "countrySpecificProperties": {
            "type": "object",
            "deprecated": true,
            "properties": {
              "usaGroupExempt": {
                "type": "boolean",
                "nullable": true,
                "description": "USA-specific group exempt",
                "deprecated": true
              },
              "fcra": {
                "type": "string",
                "nullable": true,
                "description": "Foreign Contribution Regulation Act registration number for Indian organisations",
                "example": "123456789"
              },
              "DGR1": {
                "type": "boolean",
                "nullable": true,
                "description": "Australian Deductible Gift Recipient (DGR) status - Item 1. Only present for Australian organisations",
                "example": true
              },
              "DGR2": {
                "type": "boolean",
                "nullable": true,
                "description": "Australian Deductible Gift Recipient (DGR) status - Item 2. Only present for Australian organisations",
                "example": false
              },
              "DGR4": {
                "type": "boolean",
                "nullable": true,
                "description": "Australian Deductible Gift Recipient (DGR) status - Item 4. Only present for Australian organisations",
                "example": true
              }
            }
          },
          "isBranchParent": {
            "type": "boolean",
            "nullable": false,
            "description": "Whether this organisation is a parent of a branch",
            "example": false
          },
          "location": {
            "type": "object",
            "nullable": true,
            "properties": {
              "lat": {
                "type": "number",
                "example": -33.86785
              },
              "lon": {
                "type": "number",
                "example": 151.20732
              }
            }
          }
        }
      },
      "GivingOrganisationPublic": {
        "type": "object",
        "description": "Organisation details",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the organization",
            "example": "organisation_xxxxxxxxx",
            "minLength": 1,
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "Name of the organization",
            "minLength": 1,
            "maxLength": 255
          },
          "countryCode": {
            "type": "string",
            "description": "Country code of the organization",
            "example": "GBR",
            "minLength": 3,
            "maxLength": 3
          },
          "logo": {
            "type": "string",
            "nullable": true,
            "description": "URL of the organization logo",
            "minLength": 1,
            "maxLength": 2048
          },
          "website": {
            "type": "string",
            "format": "url",
            "nullable": true,
            "description": "Website associated with the organization",
            "minLength": 1,
            "maxLength": 2048
          }
        }
      },
      "GivingAction": {
        "type": "object",
        "required": [
          "id",
          "partnerId",
          "name",
          "description",
          "frequency",
          "pointValue",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "givingaction_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "partnerId": {
            "type": "string",
            "example": "partner_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Walk 10,000 steps"
          },
          "description": {
            "type": "string",
            "example": "Complete 10,000 steps in a day"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "once",
              "daily"
            ],
            "example": "daily"
          },
          "pointValue": {
            "type": "integer",
            "example": 100
          },
          "url": {
            "type": "string",
            "nullable": true,
            "example": "https://example.com/giving-actions/walk-10000-steps"
          },
          "createdBy": {
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-06-30T12:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-06-30T12:00:00Z"
          }
        }
      },
      "ArchivedGivingAction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GivingAction"
          },
          {
            "type": "object",
            "required": [
              "archivedAt"
            ],
            "properties": {
              "archivedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2026-07-01T12:00:00Z"
              }
            }
          }
        ]
      },
      "CreateGivingActionTarget": {
        "type": "object",
        "required": [
          "targetType",
          "targetId"
        ],
        "properties": {
          "targetType": {
            "type": "string",
            "enum": [
              "campaign"
            ],
            "example": "campaign"
          },
          "targetId": {
            "type": "string",
            "example": "givingcampaign_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          }
        }
      },
      "GivingActionCampaignLink": {
        "type": "object",
        "required": [
          "associationId",
          "campaignId",
          "linkedBy",
          "linkedAt",
          "isCurrentlyActive"
        ],
        "properties": {
          "associationId": {
            "type": "string",
            "example": "givingactionassociation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "campaignId": {
            "type": "string",
            "example": "givingcampaign_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "linkedBy": {
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "linkedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-06-30T12:00:00Z"
          },
          "isCurrentlyActive": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "GivingActionWithCampaignLink": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GivingAction"
          },
          {
            "type": "object",
            "required": [
              "campaignLink"
            ],
            "properties": {
              "pointValue": {
                "type": "integer",
                "minimum": 0,
                "example": 100
              },
              "campaignLink": {
                "$ref": "#/components/schemas/GivingActionCampaignLink"
              }
            }
          }
        ]
      },
      "ArchivedGivingActionCampaignLink": {
        "type": "object",
        "required": [
          "id",
          "campaignLink"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "givingaction_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "campaignLink": {
            "type": "object",
            "required": [
              "associationId",
              "campaignId",
              "archivedAt",
              "archivedBy"
            ],
            "properties": {
              "associationId": {
                "type": "string",
                "example": "givingactionassociation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "campaignId": {
                "type": "string",
                "example": "givingcampaign_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "archivedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2026-07-01T12:00:00Z"
              },
              "archivedBy": {
                "type": "string",
                "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "GivingActionCampaignLinkListItem": {
        "type": "object",
        "required": [
          "associationId",
          "actionId",
          "campaignId",
          "linkedBy",
          "linkedAt",
          "archivedAt",
          "isCurrentlyActive"
        ],
        "properties": {
          "associationId": {
            "type": "string",
            "example": "givingactionassociation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "actionId": {
            "type": "string",
            "example": "givingaction_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "campaignId": {
            "type": "string",
            "example": "givingcampaign_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "linkedBy": {
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "linkedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-06-30T12:00:00Z"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": null
          },
          "isCurrentlyActive": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "LinkGivingActionToCampaignRequest": {
        "type": "object",
        "required": [
          "actionId"
        ],
        "properties": {
          "actionId": {
            "type": "string",
            "example": "givingaction_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          }
        }
      },
      "CreateGivingActionRequest": {
        "type": "object",
        "required": [
          "name",
          "description",
          "frequency",
          "pointValue"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "example": "Walk 10,000 steps"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "example": "Complete 10,000 steps in a day"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "once",
              "daily"
            ],
            "example": "daily"
          },
          "pointValue": {
            "type": "integer",
            "minimum": 0,
            "example": 100
          },
          "url": {
            "type": "string",
            "nullable": true,
            "maxLength": 2048,
            "example": "https://example.com/giving-actions/walk-10000-steps"
          },
          "targetCountries": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "description": "Countries the action is available in. Omit for an action available everywhere.\n",
            "example": [
              "GBR"
            ]
          },
          "organisationId": {
            "type": "string",
            "nullable": true,
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "rewardsEligible": {
            "type": "boolean",
            "default": false
          },
          "publishGlobally": {
            "type": "boolean",
            "default": true,
            "description": "Make the action available to every account in the Partner from creation, independently of any campaign. Set false to create an action that is only available through the campaigns it is linked to.\n"
          },
          "target": {
            "nullable": true,
            "$ref": "#/components/schemas/CreateGivingActionTarget"
          }
        }
      },
      "CreateGivingActionByAdminRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateGivingActionRequest"
          },
          {
            "type": "object",
            "required": [
              "partnerId"
            ],
            "properties": {
              "partnerId": {
                "type": "string",
                "example": "partner_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              }
            }
          }
        ]
      },
      "OrganisationSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Green world"
          },
          "amount": {
            "type": "number",
            "example": 10000
          },
          "currencyCode": {
            "type": "string",
            "example": "AUD"
          },
          "logo": {
            "type": "string",
            "format": "url",
            "nullable": true
          }
        }
      },
      "Milestone": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "milestone_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "amount": {
            "type": "integer",
            "example": 1000
          },
          "reward": {
            "type": "string",
            "example": "This is a reward"
          },
          "currencyCode": {
            "type": "string"
          },
          "organisationId": {
            "type": "string"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GiftAid": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "giftaid_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "buildingNameNumber": {
            "type": "string"
          },
          "roadName": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "UserOrganisation": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "organisationId": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          }
        }
      },
      "DonationBase": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "donation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "organisationId": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "description": "Donation amount. A positive integer representing donation amount in the smallest currency unit, for example 100 pence for a donation of £1.00.",
            "type": "integer",
            "example": 123
          },
          "currencyCode": {
            "description": "Three-letter ISO currency code",
            "type": "string",
            "example": "AUD"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "REQUESTED_PAYMENT",
              "RECEIVED_PAYMENT",
              "DISBURSED",
              "CANCELLED"
            ]
          },
          "firstName": {
            "type": "string",
            "nullable": true,
            "description": "Users first name."
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "description": "Users last name."
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Users email."
          },
          "consentedToBeContacted": {
            "type": "string",
            "enum": [
              "yes",
              "no"
            ],
            "nullable": true,
            "description": "Whether the user consented to be contacted by the benefitting organisation."
          },
          "anonymous": {
            "type": "string",
            "enum": [
              "yes",
              "no"
            ],
            "nullable": true,
            "description": "Whether the user wants to share their donation publicly or not."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "giftAidId": {
            "type": "string",
            "nullable": true
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          },
          "donationRequestId": {
            "type": "string",
            "example": "donationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "accountId": {
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "disbursement": {
            "$ref": "#/components/schemas/DonationDisbursement",
            "nullable": true
          },
          "organisation": {
            "$ref": "#/components/schemas/DonationOrganisation",
            "nullable": true
          },
          "category": {
            "type": "string",
            "enum": [
              "grant",
              "corporate",
              "fee",
              "direct"
            ],
            "nullable": true
          }
        }
      },
      "DonationOrganisation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "logo": {
            "type": "string",
            "format": "url",
            "nullable": true
          }
        }
      },
      "DonationDisbursement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "disbursement_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "type": {
            "type": "string",
            "nullable": false,
            "enum": [
              "bank_transfer",
              "cheque",
              "card"
            ]
          },
          "status": {
            "type": "string",
            "example": "paid",
            "nullable": false
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "inTransitAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "DonationDirect": {
        "title": "direct donation",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/DonationBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "direct"
                ]
              }
            }
          }
        ]
      },
      "DonationHosted": {
        "type": "object",
        "title": "hosted donation",
        "allOf": [
          {
            "$ref": "#/components/schemas/DonationBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "hosted"
                ]
              },
              "hosted": {
                "type": "object",
                "description": "Contains additional fields available for hosted Donations.",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "example": "donationsession_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "description": "Donation Session Id"
                  }
                }
              }
            }
          }
        ]
      },
      "UserDonationReport": {
        "type": "object",
        "properties": {
          "currencyCode": {
            "description": "Three-letter ISO currency code",
            "type": "string",
            "example": "GBP"
          },
          "totalDonationAmount": {
            "description": "Total Donation amount. A positive integer representing donation amount in the smallest currency unit, for example 100 pence for a donation of £1.00.",
            "type": "integer"
          },
          "totalDonationCount": {
            "type": "integer"
          },
          "organisations": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Organisation"
                },
                {
                  "type": "object",
                  "properties": {
                    "donationAmount": {
                      "description": "Donation amount. A positive integer representing donation amount in the smallest currency unit, for example 100 pence for a donation of £1.00.",
                      "type": "integer",
                      "example": 120
                    },
                    "donationCount": {
                      "type": "string",
                      "example": 1
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "DonationStatisticsVolume": {
        "type": "object",
        "properties": {
          "totalDonationCount": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "example": "2020-10-13"
                },
                "amount": {
                  "type": "string",
                  "example": 100
                },
                "donationCount": {
                  "type": "string",
                  "example": 1
                }
              }
            }
          }
        }
      },
      "Registry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "registry_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Charity Registry"
          },
          "englishName": {
            "type": "string",
            "example": "Charity Registry"
          },
          "code": {
            "type": "string",
            "example": "CR"
          }
        }
      },
      "Country": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "BEL"
          },
          "name": {
            "type": "string",
            "example": "Belgium"
          },
          "hasRegistry": {
            "type": "boolean",
            "example": true
          },
          "endonyms": {
            "type": "object",
            "example": {
              "de": "Belgien",
              "fr": "Belgique",
              "nl": "België"
            }
          }
        }
      },
      "ValidationRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Some charity"
          },
          "registryName": {
            "type": "string",
            "example": "National Charities Registry"
          },
          "registryId": {
            "type": "string",
            "example": "I34324",
            "description": "Charity's ID in registry"
          },
          "email": {
            "type": "string",
            "format": "email",
            "nullable": true,
            "example": "test@percent.internal"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true,
            "example": "Testowa street 15"
          },
          "addressLine2": {
            "type": "string",
            "nullable": true,
            "example": "Testowa street 22/15"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Katowice"
          },
          "postal": {
            "type": "string",
            "nullable": true,
            "example": "44-100"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "example": "Silesia"
          },
          "website": {
            "type": "string",
            "format": "website",
            "example": "https://percent.internal"
          },
          "organisationId": {
            "type": "string",
            "nullable": true,
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "countryCode": {
            "type": "string",
            "example": "POL"
          },
          "rejectionReason": {
            "type": "string",
            "description": "Reason for rejecting",
            "nullable": true,
            "deprecated": true,
            "enum": [
              "Organisation is not a nonprofit.",
              "Organisation didn’t provide sufficient proof of nonprofit status.",
              "Organisation is a nonprofit but doesn’t have an official registry ID.",
              "Other"
            ]
          },
          "rejectionReasonCode": {
            "type": "string",
            "description": "Reason code for rejecting",
            "nullable": true,
            "enum": [
              "other",
              "not_eligible",
              "incorrect_documentation",
              "not_attributable_to_registry"
            ]
          },
          "usaGroupExempt": {
            "type": "boolean",
            "nullable": true,
            "deprecated": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2020-10-13T17:46:54.000Z"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2020-10-13T17:46:54.000Z"
          },
          "rejectedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2020-10-13T17:46:54.000Z"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationRequestDocument"
            }
          },
          "organisationTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "social_impact",
                "nonprofit"
              ]
            }
          }
        }
      },
      "ValidationRequestDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationrequestdocument_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "url": {
            "type": "string",
            "example": "https://s3-eu-west-1.amazonaws.com/assets.poweredbypercent.com/document.docx"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "MonitoringSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "live",
            "enum": [
              "live",
              "pending_validation_request",
              "validation_request_failed",
              "pending",
              "cancelled"
            ]
          },
          "configurationId": {
            "type": "string",
            "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "results": {
            "$ref": "#/components/schemas/MonitoringSubscriptionResults"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "organisation": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Name of the organisation the Monitoring Subscription is attached to",
                "nullable": true
              }
            }
          }
        }
      },
      "MonitoringSubscriptionCancelledResponseData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "cancelled",
            "enum": [
              "cancelled"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          }
        }
      },
      "EligibilitySubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "eligibilitysubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "organisationName": {
            "type": "string",
            "nullable": true
          },
          "partnerId": {
            "type": "string",
            "nullable": false
          },
          "configurationId": {
            "type": "string",
            "nullable": false
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "suggestedActivitySubTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivitySubTagWithTag"
            },
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "live",
            "enum": [
              "live",
              "pending_validation_request",
              "validation_request_failed",
              "pending",
              "cancelled",
              "cannot_define_eligibility"
            ]
          },
          "results": {
            "$ref": "#/components/schemas/EligibilitySubscriptionResults"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          }
        }
      },
      "MonitoringSubscriptionResults": {
        "type": "object",
        "nullable": true,
        "properties": {
          "complianceStatus": {
            "type": "string",
            "enum": [
              "pass",
              "fail"
            ],
            "example": "fail",
            "nullable": true
          },
          "registration": {
            "nullable": true,
            "type": "object",
            "properties": {
              "active": {
                "type": "string",
                "enum": [
                  "yes",
                  "no"
                ],
                "example": "no"
              }
            }
          },
          "warning": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "flag"
              }
            },
            "nullable": true
          },
          "sanction": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "flag"
              }
            },
            "nullable": true
          },
          "controversial": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "flag"
              }
            },
            "nullable": true
          },
          "commercial": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "flag"
              }
            },
            "nullable": true
          },
          "adverseMedia": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "clear"
              }
            },
            "nullable": true
          },
          "hateSpeech": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clear",
                  "flag"
                ],
                "example": "flag"
              }
            },
            "nullable": true
          }
        }
      },
      "EligibilitySubscriptionResults": {
        "type": "object",
        "properties": {
          "eligibilityStatus": {
            "type": "string",
            "enum": [
              "pass",
              "fail"
            ],
            "example": "fail",
            "nullable": true
          },
          "confirmedActivitySubTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivitySubTagWithTag"
            },
            "nullable": true
          },
          "rejectedActivitySubTags": {
            "description": "Confirmed organisation's activity subtags that are not allowed in partner's configuration",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivitySubTagWithTag"
            },
            "nullable": true
          }
        }
      },
      "VettingEventResults": {
        "type": "object",
        "properties": {
          "registration": {
            "type": "object",
            "properties": {
              "active": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            }
          },
          "warning": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "sanction": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "compliance": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pass",
                  "fail",
                  "pending"
                ],
                "example": "fail"
              }
            },
            "nullable": true
          },
          "controversial": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "commercial": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "adverseMedia": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "hateSpeech": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "religious": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          },
          "educational": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "yes"
              }
            },
            "nullable": true
          },
          "governmental": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "pending"
                ],
                "example": "no"
              }
            },
            "nullable": true
          }
        }
      },
      "WebhookEventsEnum": {
        "type": "string",
        "enum": [
          "validation_request.approved",
          "validation_request.rejected",
          "agent_verification.pending_review",
          "agent_verification.pending_user_verification",
          "agent_verification.approved",
          "agent_verification.rejected",
          "monitoring_subscription.updated",
          "eligibility_subscription.updated",
          "validation_submission.created",
          "validation_submission.succeeded",
          "validation_submission.failed",
          "validation_submission.updated",
          "donation.hosted.payment_received",
          "donation.created",
          "donation.settled",
          "donation.disbursed",
          "donation.payment_successful",
          "donation.cancelled",
          "donation.reassigned",
          "monetary_donation_verification.received",
          "monetary_donation_verification.progressed"
        ]
      },
      "WebhookEventsArray": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/WebhookEventsEnum"
        }
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "webhooksubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "events": {
            "$ref": "#/components/schemas/WebhookEventsArray"
          },
          "url": {
            "type": "string",
            "format": "website",
            "example": "https://example.com/my-webhook-handler"
          },
          "secret": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "AgentVerification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "firstName": {
            "type": "string",
            "example": "Max"
          },
          "lastName": {
            "type": "string",
            "example": "Plank"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true,
            "description": "Organisation Id"
          },
          "organisation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "nullable": true,
                "description": "Organisation Id"
              },
              "email": {
                "type": "string",
                "example": "org@example.com",
                "nullable": true,
                "description": "Organisation email"
              },
              "name": {
                "example": "Great Charity",
                "nullable": true,
                "description": "Organisation name"
              }
            }
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "example@example.com"
          },
          "language": {
            "type": "string",
            "example": "en-GB"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "validationRequest": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Great Charity",
                "nullable": true
              }
            }
          },
          "title": {
            "type": "string",
            "example": "Board Member",
            "nullable": true
          },
          "rejectionReason": {
            "type": "string",
            "deprecated": true,
            "nullable": true,
            "description": "Reason for rejecting agent verification",
            "enum": [
              "Validation request failed",
              "User verification expired",
              "Identity check failed",
              "No evidence agent’s email is associated with organisation",
              "Agent/nonprofit will reapply",
              "Agent used fake or test email",
              "No online presence to complete check",
              "Nonprofit association expired",
              "Other"
            ]
          },
          "rejectionReasonCode": {
            "type": "string",
            "description": "Reason code for rejecting agent verification",
            "nullable": true,
            "enum": [
              "validation_request_failed",
              "user_verification_expired",
              "user_failed_percent_review",
              "reapply",
              "fake_email_used",
              "no_online_presence",
              "nonprofit_association_expired",
              "invalid_documentation",
              "invalid_role",
              "expired_documentation",
              "fake_documentation",
              "mismatched_information",
              "blank_corrupted_documentation",
              "suspicious_application",
              "other"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "pending_user_verification",
              "pending_review",
              "approved",
              "rejected"
            ]
          },
          "externalActionRequired": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "AgentVerificationDocumentStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "hasUploadedDocuments": {
            "type": "boolean",
            "example": true
          },
          "awaitingDocumentUpload": {
            "type": "boolean",
            "example": true
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "pending_user_verification",
              "pending_review",
              "approved",
              "rejected"
            ]
          },
          "partnerName": {
            "type": "string",
            "example": "Google"
          },
          "partnerLogo": {
            "type": "string",
            "format": "url",
            "nullable": true,
            "example": "https://example.com/logo.jpg"
          },
          "partnerBanner": {
            "type": "string",
            "format": "url",
            "nullable": true,
            "example": "https://example.com/banner.jpg"
          },
          "organisationName": {
            "type": "string",
            "example": "Gazprom"
          },
          "rejectionReason": {
            "type": "string",
            "nullable": true,
            "example": "unclear"
          },
          "attemptsRemaining": {
            "type": "integer",
            "example": 3
          },
          "documentReuploadEnabled": {
            "type": "boolean",
            "example": false
          },
          "programType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "education",
              "nonprofit",
              "social_impact"
            ],
            "example": "education"
          }
        }
      },
      "AgentVerificationUserVerification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "firstName": {
            "type": "string",
            "example": "Max"
          },
          "lastName": {
            "type": "string",
            "example": "Plank"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true,
            "description": "Organisation Id"
          },
          "logo": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "agentVerificationRedirectUrl": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "example@example.com"
          },
          "language": {
            "type": "string",
            "example": "en-GB"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "title": {
            "type": "string",
            "example": "Board Member",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "pending_user_verification",
              "pending_review",
              "approved",
              "rejected"
            ]
          },
          "rejectionReason": {
            "type": "string",
            "deprecated": true,
            "nullable": true,
            "description": "Reason for rejecting agent verification",
            "enum": [
              "Validation request failed",
              "User verification expired",
              "Identity check failed",
              "No evidence agent’s email is associated with organisation",
              "Agent/nonprofit will reapply",
              "Agent used fake or test email",
              "No online presence to complete check",
              "Nonprofit association expired",
              "Other"
            ]
          },
          "rejectionReasonCode": {
            "type": "string",
            "description": "Reason code for rejecting agent verification",
            "nullable": true,
            "enum": [
              "validation_request_failed",
              "user_verification_expired",
              "user_failed_percent_review",
              "reapply",
              "fake_email_used",
              "no_online_presence",
              "nonprofit_association_expired",
              "invalid_documentation",
              "invalid_role",
              "expired_documentation",
              "fake_documentation",
              "mismatched_information",
              "blank_corrupted_documentation",
              "suspicious_application",
              "other"
            ]
          },
          "externalActionRequired": {
            "type": "boolean",
            "example": true
          },
          "metadata": {
            "type": "object",
            "description": "Parameter to store additional information about the agent verification. Keys must be 40 characters or less. Values must be 100 characters or less. Up to 5 key-value pairs.",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          }
        }
      },
      "ActivityCheck": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activitycheck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true,
            "description": "Organisation Id"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "pending_validation_request",
              "validation_request_failed",
              "live",
              "cancelled"
            ]
          },
          "configurationId": {
            "type": "string",
            "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "description": "ID of configuration used in Validation Submission"
          },
          "configuration": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Validation Submission configuration id",
                "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string",
                "description": "Validation Submission configuration name",
                "nullable": true
              }
            }
          }
        }
      },
      "ActivityCheckGet": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ActivityCheck"
          },
          {
            "type": "object",
            "properties": {
              "verifiedActivity": {
                "type": "string",
                "example": "038",
                "nullable": true
              },
              "status": {
                "type": "string",
                "example": "pending",
                "enum": [
                  "pending",
                  "pending_validation_request",
                  "live",
                  "validation_request_failed",
                  "cancelled"
                ]
              }
            }
          }
        ]
      },
      "ActivityCheckCancel": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ActivityCheck"
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "example": "cancelled",
                "enum": [
                  "cancelled"
                ]
              }
            }
          }
        ]
      },
      "ValidationInvite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "status": {
            "type": "string",
            "example": "open",
            "enum": [
              "open",
              "expired",
              "complete"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "language": {
            "type": "string",
            "description": "Defaults to en-GB",
            "example": "en-GB"
          },
          "redirectUrl": {
            "type": "string",
            "format": "url",
            "description": "Url that the hosted form redirects to after the flow is completed",
            "example": "https://example.com/finish"
          },
          "url": {
            "type": "string",
            "description": "Dynamic Hosted form URL for the validation invite",
            "format": "url",
            "example": "https://validation.poweredbypercent.com/validate/validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx?token=asasjhd"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-20T17:46:54.000Z"
          }
        }
      },
      "ValidationSubmission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "processed",
              "failed",
              "succeeded"
            ]
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "organisationName": {
            "type": "string",
            "nullable": true
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "validationRequestName": {
            "type": "string",
            "nullable": true,
            "deprecated": true
          },
          "validationRequest": {
            "type": "object",
            "nullable": true,
            "properties": {
              "acceptedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2022-02-02T17:46:54.000Z",
                "nullable": true
              },
              "rejectedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2022-02-02T17:46:54.000Z",
                "nullable": true
              },
              "id": {
                "type": "string",
                "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string"
              },
              "organisationTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "nonprofit",
                    "social_impact"
                  ]
                }
              }
            }
          },
          "monitoringSubscriptionId": {
            "type": "string",
            "example": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "agentVerification": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string",
                "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "email": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "pending_user_verification",
                  "pending_review",
                  "approved",
                  "rejected"
                ]
              },
              "rejectionReason": {
                "type": "string",
                "deprecated": true,
                "nullable": true,
                "description": "Reason for rejecting agent verification",
                "enum": [
                  "Validation request failed",
                  "User verification expired",
                  "Identity check failed",
                  "No evidence agent’s email is associated with organisation",
                  "Agent/nonprofit will reapply",
                  "Agent used fake or test email",
                  "No online presence to complete check",
                  "Nonprofit association expired",
                  "Other"
                ]
              },
              "rejectionReasonCode": {
                "type": "string",
                "description": "Reason code for rejecting agent verification",
                "nullable": true,
                "enum": [
                  "validation_request_failed",
                  "user_verification_expired",
                  "user_failed_percent_review",
                  "reapply",
                  "fake_email_used",
                  "no_online_presence",
                  "nonprofit_association_expired",
                  "invalid_documentation",
                  "invalid_role",
                  "expired_documentation",
                  "fake_documentation",
                  "mismatched_information",
                  "blank_corrupted_documentation",
                  "suspicious_application",
                  "other"
                ]
              },
              "language": {
                "type": "string",
                "example": "en-GB",
                "default": "en-GB"
              }
            }
          },
          "eligibilitySubscriptionId": {
            "type": "string",
            "example": "eligibilitysubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "eligibility": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "example": "live",
                "enum": [
                  "live",
                  "pending_validation_request",
                  "validation_request_failed",
                  "pending",
                  "cancelled",
                  "cannot_define_eligibility"
                ]
              },
              "results": {
                "type": "object",
                "properties": {
                  "eligibilityStatus": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "fail"
                    ],
                    "example": "fail",
                    "nullable": true
                  },
                  "confirmedActivitySubTags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "nullable": true
                  },
                  "rejectedActivitySubTags": {
                    "description": "Confirmed organisation's activity subtags that are not allowed in partner's configuration",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "nullable": true
                  }
                }
              }
            }
          },
          "organisation": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string",
                "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string",
                "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "nullable": true
              },
              "countryCode": {
                "type": "string",
                "example": "AUS",
                "description": "3-letter ISO country code"
              }
            }
          },
          "processedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "partnerFields": {
            "type": "object",
            "description": "Responses for custom partner questions",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "configuration": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Validation Submission configuration id",
                "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string",
                "description": "Validation Submission configuration name",
                "nullable": true
              },
              "allowedOrganisations": {
                "type": "object",
                "properties": {
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "social_impact",
                        "nonprofit",
                        "education"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SingleApiValidationSubmission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "status": {
            "type": "string",
            "example": "pending",
            "enum": [
              "pending",
              "failed",
              "succeeded",
              "processed"
            ]
          },
          "processedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z",
            "nullable": true
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "organisationName": {
            "type": "string",
            "nullable": true
          },
          "monitoringSubscriptionId": {
            "type": "string",
            "example": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "eligibilitySubscriptionId": {
            "type": "string",
            "example": "eligibilitysubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z"
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "agentVerification": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string",
                "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "email": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "pending_user_verification",
                  "pending_review",
                  "approved",
                  "rejected"
                ]
              },
              "rejectionReason": {
                "type": "string",
                "deprecated": true,
                "nullable": true,
                "description": "Reason for rejecting agent verification",
                "enum": [
                  "Validation request failed",
                  "User verification expired",
                  "Identity check failed",
                  "No evidence agent’s email is associated with organisation",
                  "Agent/nonprofit will reapply",
                  "Agent used fake or test email",
                  "No online presence to complete check",
                  "Nonprofit association expired",
                  "Other"
                ]
              },
              "rejectionReasonCode": {
                "type": "string",
                "description": "Reason code for rejecting agent verification",
                "nullable": true,
                "enum": [
                  "validation_request_failed",
                  "user_verification_expired",
                  "user_failed_percent_review",
                  "reapply",
                  "fake_email_used",
                  "no_online_presence",
                  "invalid_documentation",
                  "invalid_role",
                  "expired_documentation",
                  "nonprofit_association_expired",
                  "fake_documentation",
                  "mismatched_information",
                  "blank_corrupted_documentation",
                  "suspicious_application",
                  "other"
                ]
              }
            }
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "validationRequest": {
            "type": "object",
            "nullable": true,
            "properties": {
              "acceptedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2022-02-02T17:46:54.000Z",
                "nullable": true
              },
              "rejectedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2022-02-02T17:46:54.000Z",
                "nullable": true
              },
              "id": {
                "type": "string",
                "example": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string",
                "nullable": true
              },
              "organisationTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "nonprofit",
                    "social_impact"
                  ]
                }
              }
            }
          },
          "eligibility": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "example": "live",
                "enum": [
                  "live",
                  "pending_validation_request",
                  "validation_request_failed",
                  "pending",
                  "cancelled",
                  "cannot_define_eligibility"
                ]
              },
              "results": {
                "type": "object",
                "properties": {
                  "eligibilityStatus": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "fail"
                    ],
                    "example": "fail",
                    "nullable": true
                  },
                  "confirmedActivitySubTags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "nullable": true
                  },
                  "rejectedActivitySubTags": {
                    "description": "Confirmed organisation's activity subtags that are not allowed in partner's configuration",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "nullable": true
                  }
                }
              }
            }
          },
          "monitoring": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "example": "live",
                "enum": [
                  "live",
                  "pending_validation_request",
                  "validation_request_failed",
                  "pending",
                  "cancelled"
                ]
              },
              "results": {
                "$ref": "#/components/schemas/MonitoringSubscriptionResults"
              }
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "partnerFields": {
            "type": "object",
            "description": "Responses for custom partner questions",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "configuration": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Validation Submission configuration id",
                "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "name": {
                "type": "string",
                "description": "Validation Submission configuration name",
                "nullable": true
              },
              "allowedOrganisations": {
                "type": "object",
                "properties": {
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "social_impact",
                        "nonprofit",
                        "education"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ValidationSubmissionCreatedWebhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of Validation Submission event is tied to",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "validationSubmissionHostedConfigurationId": {
            "type": "string",
            "description": "ID of configuration used in Validation Submission"
          },
          "organisationId": {
            "type": "string",
            "nullable": true,
            "description": "ID of organisation attached to Validation Submission"
          },
          "status": {
            "type": "string",
            "description": "Status of Validation Submission",
            "example": "pending"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp of when Validation Submission was created",
            "format": "date-time",
            "example": "2021-08-02T11:00:00.000Z"
          },
          "processedAt": {
            "type": "string",
            "nullable": true,
            "description": "Timestamp of when Validation Submission has been processed by Percent",
            "format": "date-time",
            "example": "2021-08-02T11:00:00.000Z"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxx",
            "description": "ID of Validation Request tied to Validation Submission'",
            "nullable": true
          },
          "eligibilitySubscriptionId": {
            "type": "string",
            "example": "eligibilitysubscription__xxxxxxxxxxxx",
            "description": "ID of Eligibility Subscription tied to Validation Submission",
            "nullable": true
          },
          "monitoringSubscriptionId": {
            "type": "string",
            "example": "monitoringsubscription__xxxxxxxxxxxx",
            "description": "ID of Monitoring Subscription tied to Validation Submission",
            "nullable": true
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxx",
            "description": "ID of Agent Verification tied to Validation Submission",
            "nullable": true
          },
          "partnerFields": {
            "type": "object",
            "description": "Responses for custom partner questions",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxx",
            "description": "ID of Validation Invite tied to Validation Submission",
            "nullable": true
          }
        }
      },
      "PartnerProgramConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Validation Submission configuration id",
            "example": "hostedconfiguration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "description": "Validation Submission configuration name",
            "nullable": true
          },
          "allowedOrganisationsTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "social_impact",
                "nonprofit",
                "education"
              ]
            }
          },
          "complianceFlags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "warning",
                "sanction",
                "controversial",
                "commercial",
                "adverseMedia",
                "hateSpeech",
                "compliance"
              ]
            }
          },
          "rejectedOrganisationsTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "social_impact",
                "nonprofit",
                "education"
              ]
            }
          },
          "allowedActivitySubTags": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            }
          },
          "exceptionRules": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Eligibility exception rule name"
            }
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "individual_apis",
                "single_api",
                "hosted_validation_form",
                "static_link",
                "validation_invite",
                "token_service_method",
                "workplace_giving",
                "grants",
                "product_nomination",
                "monetary_donation"
              ]
            },
            "description": "Purpose(s) of this validation submission configuration",
            "example": [
              "single_api",
              "hosted_validation_form"
            ]
          }
        }
      },
      "FraudChecksList": {
        "type": "object",
        "properties": {
          "basicDomainChecks": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "basic_domain_check"
                ]
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "basic_domain_check"
                }
              }
            }
          },
          "advancedDomainChecks": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "advanced_domain_check"
                ]
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "advanced_domain_check"
                }
              }
            }
          },
          "applicationChecks": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "application_check"
                ]
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "application_check"
                }
              }
            }
          },
          "documentChecks": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "document_check"
                ]
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "duplicateDocumentCheck"
                }
              }
            }
          }
        }
      },
      "AgentVerificationFailure": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "example": "agent_verification"
          },
          "reason": {
            "type": "object",
            "properties": {
              "rejectionReasonCode": {
                "type": "string",
                "enum": [
                  "validation_request_failed",
                  "user_verification_expired",
                  "user_failed_percent_review",
                  "reapply",
                  "fake_email_used",
                  "invalid_documentation",
                  "invalid_role",
                  "expired_documentation",
                  "no_online_presence",
                  "fake_documentation",
                  "mismatched_information",
                  "blank_corrupted_documentation",
                  "suspicious_application",
                  "other"
                ]
              }
            }
          }
        }
      },
      "ValidationRequestFailure": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "example": "validation_request"
          },
          "reason": {
            "type": "object",
            "properties": {
              "rejectionReasonCode": {
                "type": "string",
                "enum": [
                  "other",
                  "not_eligible",
                  "incorrect_documentation",
                  "not_attributable_to_registry"
                ]
              }
            }
          }
        }
      },
      "ComplianceFailure": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "example": "compliance"
          },
          "reason": {
            "type": "object",
            "properties": {
              "monitoringSubscriptionResults": {
                "$ref": "#/components/schemas/MonitoringSubscriptionResults"
              }
            }
          }
        }
      },
      "EligibilityFailure": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "example": "eligibility"
          },
          "reason": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "live",
                  "cannot_define_eligibility"
                ]
              },
              "results": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "eligibilityStatus": {
                        "type": "null"
                      },
                      "confirmedActivitySubTags": {
                        "type": "null"
                      },
                      "rejectedActivitySubTags": {
                        "type": "null"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "eligibilityStatus": {
                        "type": "string",
                        "enum": [
                          "fail"
                        ]
                      },
                      "confirmedActivitySubTags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "tag": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              }
                            },
                            "description": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "rejectedActivitySubTags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "tag": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              }
                            },
                            "description": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "ValidationSubmissionFailedWebhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of Validation Submission event is tied to",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "validationSubmissionHostedConfigurationId": {
            "type": "string",
            "description": "ID of configuration used in Validation Submission"
          },
          "organisationId": {
            "type": "string",
            "nullable": true,
            "description": "ID of organisation attached to Validation Submission"
          },
          "status": {
            "type": "string",
            "description": "Status of Validation Submission",
            "example": "failed"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z",
            "description": "Timestamp of when Validation Submission was created"
          },
          "processedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z",
            "description": "Timestamp of when Validation Submission has been processed by Percent"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxx",
            "description": "ID of Validation Request tied to Validation Submission'",
            "nullable": true
          },
          "eligibilitySubscriptionId": {
            "type": "string",
            "example": "eligibilitysubscription__xxxxxxxxxxxx",
            "description": "ID of Eligibility Subscription tied to Validation Submission",
            "nullable": true
          },
          "monitoringSubscriptionId": {
            "type": "string",
            "example": "monitoringsubscription__xxxxxxxxxxxx",
            "description": "ID of Monitoring Subscription tied to Validation Submission",
            "nullable": true
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxx",
            "description": "ID of Agent Verification tied to Validation Submission",
            "nullable": true
          },
          "partnerFields": {
            "type": "object",
            "description": "Responses for custom partner questions",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxx",
            "description": "ID of Validation Invite tied to Validation Submission",
            "nullable": true
          },
          "failureReasons": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ValidationRequestFailure"
                },
                {
                  "$ref": "#/components/schemas/EligibilityFailure"
                },
                {
                  "$ref": "#/components/schemas/ComplianceFailure"
                },
                {
                  "$ref": "#/components/schemas/AgentVerificationFailure"
                }
              ]
            }
          }
        }
      },
      "ValidationSubmissionSucceededWebhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of Validation Submission event is tied to",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "validationSubmissionHostedConfigurationId": {
            "type": "string",
            "description": "ID of configuration used in Validation Submission"
          },
          "organisationId": {
            "type": "string",
            "description": "ID of organisation attached to Validation Submission"
          },
          "status": {
            "type": "string",
            "description": "Status of Validation Submission",
            "example": "succeeded"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp of when Validation Submission was created",
            "example": "2021-08-02T11:00:00.000Z",
            "format": "date-time"
          },
          "processedAt": {
            "type": "string",
            "description": "Timestamp of when Validation Submission has been processed by Percent",
            "example": "2021-08-02T11:00:00.000Z",
            "format": "date-time"
          },
          "validationRequestId": {
            "type": "string",
            "example": "validationrequest_xxxxxxxxxxxx",
            "description": "ID of Validation Request tied to Validation Submission'",
            "nullable": true
          },
          "eligibilitySubscriptionId": {
            "type": "string",
            "example": "eligibilitysubscription__xxxxxxxxxxxx",
            "description": "ID of Eligibility Subscription tied to Validation Submission",
            "nullable": true
          },
          "monitoringSubscriptionId": {
            "type": "string",
            "example": "monitoringsubscription__xxxxxxxxxxxx",
            "description": "ID of Monitoring Subscription tied to Validation Submission",
            "nullable": true
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxx",
            "description": "ID of Agent Verification tied to Validation Submission",
            "nullable": true
          },
          "partnerFields": {
            "type": "object",
            "description": "Responses for custom partner questions",
            "nullable": true,
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxx",
            "description": "ID of Validation Invite tied to Validation Submission",
            "nullable": true
          }
        }
      },
      "ValidationSubmissionDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationsubmissiondocument_xxxxxxxxxxxx"
          },
          "validationInviteId": {
            "type": "string",
            "example": "validationinvite_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z"
          },
          "url": {
            "type": "string",
            "format": "url",
            "example": "https://s3-eu-west-1.amazonaws.com/assets.poweredbypercent.com/document.pdf"
          },
          "type": {
            "type": "string",
            "enum": [
              "validation_request",
              "agent_verification"
            ]
          }
        }
      },
      "ValidationSubmissionDocumentWithoutValidationInviteId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "validationsubmissiondocument_xxxxxxxxxxxx"
          },
          "validationSubmissionId": {
            "type": "string",
            "example": "validationsubmission_xxxxxxxxxxxx"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T17:46:54.000Z"
          },
          "url": {
            "type": "string",
            "format": "url",
            "example": "https://s3-eu-west-1.amazonaws.com/assets.poweredbypercent.com/document.pdf"
          },
          "type": {
            "type": "string",
            "enum": [
              "validation_request",
              "agent_verification"
            ]
          }
        }
      },
      "ActivityTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activitytag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Education",
            "description": "Tag name"
          },
          "slug": {
            "type": "string",
            "example": "education",
            "description": "URL-friendly identifier"
          },
          "description": {
            "type": "string",
            "description": "Tag description",
            "nullable": true
          },
          "subTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivitySubTag"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          }
        }
      },
      "ActivityTagWithoutSubTags": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activitytag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Education",
            "description": "Tag name"
          },
          "slug": {
            "type": "string",
            "example": "education",
            "description": "URL-friendly identifier"
          },
          "description": {
            "type": "string",
            "description": "Tag description",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          }
        }
      },
      "ActivitySubTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Sport school",
            "description": "SubTag name"
          },
          "tagId": {
            "type": "string",
            "example": "activitytag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "description": "Parent tag id"
          },
          "description": {
            "type": "string",
            "description": "SubTag description",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "deprecatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          }
        }
      },
      "FraudulentFlag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "fraudulentflag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "agentVerificationId": {
            "type": "string",
            "example": "agentverification_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "fraudRejectionReasonId": {
            "type": "string",
            "example": "fraudrejectionreason_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "fraudRejectionReason": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "fraudrejectionreason_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              },
              "code": {
                "type": "string",
                "example": "fake_email_used"
              },
              "automaticFraudCheckRelation": {
                "type": "string",
                "example": "agent_verification",
                "nullable": true
              },
              "scope": {
                "type": "string",
                "example": "agent_verification"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "example": "2020-10-13T17:46:54.000Z"
              },
              "deletedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2020-10-13T17:46:54.000Z",
                "nullable": true
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2020-10-13T17:46:54.000Z",
                "nullable": true
              }
            }
          }
        }
      },
      "ActivitySubTagWithTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "name": {
            "type": "string",
            "example": "Sport school",
            "description": "SubTag name"
          },
          "tag": {
            "$ref": "#/components/schemas/ActivityTagWithoutSubTags"
          },
          "description": {
            "type": "string",
            "description": "SubTag description",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z",
            "nullable": true
          },
          "deprecatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          }
        }
      },
      "ActivityEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "activityevent_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": false
          },
          "organisationName": {
            "type": "string",
            "nullable": false
          },
          "createdBy": {
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": false
          },
          "subTags": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "activitysubtag_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-10-13T17:46:54.000Z"
          }
        }
      },
      "ShortTextHostedFormField": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "What is your first name?"
          },
          "id": {
            "type": "string",
            "example": "first_name"
          },
          "type": {
            "type": "string",
            "example": "short_text"
          },
          "placeholder": {
            "type": "string",
            "example": "First name"
          },
          "validation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "MultipleChoiceHostedFormField": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Select all the foods you like"
          },
          "id": {
            "type": "string",
            "example": "favourite_foods"
          },
          "type": {
            "type": "string",
            "example": "multiple_choice"
          },
          "validation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "description": "The display value",
                "example": "Hot Dogs"
              },
              "value": {
                "type": "string",
                "description": "The value sent when submitted",
                "example": "hot_dog"
              }
            }
          }
        }
      },
      "SelectHostedFormField": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "What is your favourite season?"
          },
          "id": {
            "type": "string",
            "example": "favourite_season"
          },
          "type": {
            "type": "string",
            "example": "select"
          },
          "validation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          },
          "placeholder": {
            "type": "string",
            "example": "Favourite season"
          },
          "options": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "description": "The display value",
                "example": "Summer"
              },
              "value": {
                "type": "string",
                "description": "The value sent when submitted",
                "example": "summer"
              }
            }
          }
        }
      },
      "NumberHostedFormField": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "How old are you?"
          },
          "id": {
            "type": "string",
            "example": "age"
          },
          "type": {
            "type": "string",
            "example": "number"
          },
          "placeholder": {
            "type": "string",
            "example": "Your age"
          },
          "validation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "WebsiteHostedFormField": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "What is your website?"
          },
          "id": {
            "type": "string",
            "example": "website"
          },
          "type": {
            "type": "string",
            "example": "website"
          },
          "placeholder": {
            "type": "string",
            "example": "Website"
          },
          "validation": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "DonationSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "donationsession_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": false
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": false
          },
          "successUrl": {
            "description": "Optional URL the donor will be directed to after making a donation.",
            "type": "string",
            "example": "https://example.com/donation-completed",
            "nullable": true
          },
          "userId": {
            "description": "Id of the User who this donation belongs to, if one exists.",
            "type": "string",
            "example": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "accountId": {
            "description": "Id of the Account who this donation belongs to, if one exists.",
            "type": "string",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "nullable": true
          },
          "url": {
            "type": "string",
            "example": "https://donate.poweredbypercent.com/donation-session",
            "nullable": false
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "completed",
              "expired"
            ],
            "nullable": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2021-10-13T17:46:54.000Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2021-10-13T17:46:54.000Z",
            "nullable": false
          },
          "language": {
            "type": "string",
            "example": "en-GB",
            "default": "en-GB"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              },
              {
                "description": "[Key-value data](/docs/api/goodstack-services#metadata) that you can attach to an object. When a Donation is created from a DonationSession, the DonationSession copies its metadata to the Donation.\n"
              }
            ]
          },
          "currency": {
            "type": "string",
            "example": "GBP",
            "nullable": true
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reasons": {
                "nullable": true,
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Success": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "success"
          }
        }
      },
      "AccountAchievements": {
        "type": "object",
        "properties": {
          "rulesAndAchievements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rule": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "conditions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GamificationCondition"
                          }
                        },
                        "pass": {
                          "type": "boolean"
                        },
                        "currentValue": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                "achievement": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "image": {
                      "type": "string"
                    },
                    "sortOrder": {
                      "type": "number",
                      "example": 1
                    }
                  }
                },
                "accountAchievement": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "assignedBy": {
                      "type": "string",
                      "nullable": true,
                      "example": "Admin Adminowsky"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "achievementViewedAt": {
                      "type": "string",
                      "nullable": true,
                      "format": "date-time",
                      "example": "2021-10-13T17:46:54.000Z"
                    },
                    "count": {
                      "type": "number",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "facts": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "GamificationResetConfig": {
        "type": "object",
        "properties": {
          "baseResetDate": {
            "type": "string",
            "format": "date-time"
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "monthly"
            ]
          }
        }
      },
      "GamificationCondition": {
        "type": "object",
        "properties": {
          "factKind": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionLines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "value": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationCondition"
            }
          }
        }
      },
      "GamificationRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "partnerId": {
            "type": "string"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationCondition"
            }
          },
          "achievementId": {
            "type": "string"
          },
          "rewardConfig": {
            "$ref": "#/components/schemas/GamificationRewardConfig"
          }
        }
      },
      "GamificationRewardConfig": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "donation_matching_budget",
              "donation_wallet_balance",
              "reallocate_matching_budget_to_wallet"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  }
                }
              },
              "alternativeCurrencyAmounts": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  }
                }
              },
              "amountLimit": {
                "type": "integer"
              }
            }
          }
        }
      },
      "OrganisationDefaultLocale": {
        "type": "object",
        "properties": {
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxx"
          },
          "defaultLocale": {
            "type": "string",
            "example": "en-US",
            "nullable": true,
            "description": "The default locale of the organisation. Null if no default locale is set."
          }
        }
      },
      "OrganisationImage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organisationId": {
            "type": "string",
            "example": "organisation_xxxxxxxx"
          },
          "description": {
            "type": "string",
            "example": "image for facebook",
            "nullable": true,
            "description": "Description of an uploaded image."
          },
          "url": {
            "type": "string",
            "format": "url",
            "description": "URL under which the uploaded image can be accessed."
          },
          "dimensions": {
            "$ref": "#/components/schemas/ImageDimensions"
          }
        }
      },
      "BrandingImage": {
        "type": "object",
        "required": [
          "id",
          "url",
          "dimensions"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the image",
            "example": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the image",
            "example": "image for Adyen POS"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL where the image can be accessed",
            "example": "https://www.example.com"
          },
          "dimensions": {
            "$ref": "#/components/schemas/ImageDimensions"
          }
        }
      },
      "ImageDimensions": {
        "type": "object",
        "required": [
          "width",
          "height",
          "aspectRatio"
        ],
        "properties": {
          "width": {
            "type": "integer",
            "minimum": 1,
            "description": "Width of the image in pixels",
            "example": 400
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "description": "Height of the image in pixels",
            "example": 300
          },
          "aspectRatio": {
            "type": "string",
            "description": "Aspect ratio of the image",
            "example": "4:3"
          }
        }
      },
      "BrandingSettings": {
        "type": "object",
        "properties": {
          "defaultLocale": {
            "type": "string",
            "nullable": true,
            "pattern": "^[a-z]{2}(-[A-Z]{2})?$",
            "description": "Default locale for the organisation (ISO 639-1 language code, optionally with ISO 3166-1 country code)",
            "example": "en"
          }
        }
      },
      "OrganisationBranding": {
        "type": "object",
        "required": [
          "organisationId"
        ],
        "properties": {
          "organisationId": {
            "type": "string",
            "pattern": "^organisation_[a-zA-Z0-9_]+$",
            "description": "The unique identifier for the organisation",
            "example": "organisation_xxxxxxxx"
          },
          "images": {
            "type": "array",
            "nullable": true,
            "description": "Array of branding images for the organisation",
            "items": {
              "$ref": "#/components/schemas/BrandingImage"
            }
          },
          "settings": {
            "$ref": "#/components/schemas/BrandingSettings"
          }
        }
      },
      "OrganisationBrandingResponse": {
        "type": "object",
        "required": [
          "data",
          "object"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OrganisationBranding"
          },
          "object": {
            "type": "string",
            "enum": [
              "organisation_branding"
            ]
          }
        }
      },
      "DisbursementConfiguration": {
        "type": "object",
        "description": "Configuration for how the donation should be disbursed to the organization.\n",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "standalone": "#/components/schemas/StandaloneDisbursementConfiguration",
            "bundled": "#/components/schemas/BundledDisbursementConfiguration"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/StandaloneDisbursementConfiguration"
          },
          {
            "$ref": "#/components/schemas/BundledDisbursementConfiguration"
          }
        ]
      },
      "StandaloneDisbursementConfiguration": {
        "type": "object",
        "title": "Standalone Disbursement Configuration",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "standalone"
            ]
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Whether to send an email notification for this disbursement"
          },
          "reference": {
            "type": "string",
            "description": "Reference link back to original donation"
          },
          "fundSource": {
            "type": "string",
            "description": "Identifier for the bank account"
          }
        },
        "required": [
          "type",
          "sendEmail"
        ]
      },
      "BundledDisbursementConfiguration": {
        "type": "object",
        "title": "Bundled Disbursement Configuration",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "bundled"
            ]
          },
          "fundSource": {
            "type": "string",
            "description": "Identifier for the bank account"
          }
        },
        "required": [
          "type"
        ]
      },
      "GivingAiMessageWebSource": {
        "type": "object",
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": "string",
            "example": "Climate charity rankings 2026"
          },
          "url": {
            "type": "string",
            "format": "url",
            "example": "https://example.com/article"
          }
        }
      },
      "GivingAiMessageEntity": {
        "type": "object",
        "description": "A structured reference to another entity surfaced by the assistant.",
        "required": [
          "type",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "nonprofit"
            ],
            "description": "The kind of entity. Currently only `nonprofit` is emitted."
          },
          "data": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "example": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "GivingAiMessageMetadata": {
        "type": "object",
        "nullable": true,
        "description": "Optional metadata attached to a giving AI message. Present on assistant messages when the agent surfaced web sources or referenced entities; otherwise `null`.",
        "properties": {
          "webSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GivingAiMessageWebSource"
            }
          },
          "entities": {
            "type": "array",
            "description": "Entities (e.g. nonprofits) the assistant referenced in its response.",
            "items": {
              "$ref": "#/components/schemas/GivingAiMessageEntity"
            }
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "event"
            ],
            "description": "Type of object"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Id of the event"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp of when the event was created"
              },
              "eventType": {
                "type": "string",
                "description": "The type of the event"
              },
              "eventData": {
                "type": "object",
                "description": "Data associated with the event"
              }
            },
            "required": [
              "id",
              "createdAt",
              "eventType",
              "eventData"
            ]
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "ValidationRequestWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "validation_request.approved",
                      "validation_request.rejected"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "organisationTypes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "name": {
                        "type": "string"
                      },
                      "registryName": {
                        "type": "string"
                      },
                      "registryId": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "addressLine1": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string",
                        "nullable": true
                      },
                      "city": {
                        "type": "string"
                      },
                      "postal": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "website": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "acceptedAt": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "rejectedAt": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "rejectionReasonCode": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "AgentVerificationWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "agent_verification.pending_user_verification",
                      "agent_verification.pending_review",
                      "agent_verification.approved",
                      "agent_verification.rejected"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "firstName": {
                        "type": "string",
                        "description": "May be redacted based on the configuration."
                      },
                      "lastName": {
                        "type": "string",
                        "description": "May be redacted based on the configuration."
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string",
                        "description": "May be redacted based on the configuration."
                      },
                      "language": {
                        "type": "string"
                      },
                      "validationRequestId": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "rejectionReasonCode": {
                        "type": "string",
                        "nullable": true
                      },
                      "metadata": {
                        "type": "object"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "approved",
                          "rejected"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "MonitoringSubscriptionWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "monitoring_subscription.updated"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "validationRequestId": {
                        "type": "string",
                        "nullable": true
                      },
                      "status": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "results": {
                        "type": "object",
                        "properties": {
                          "complianceStatus": {
                            "type": "string"
                          },
                          "warning": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "sanction": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "hateSpeech": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "commercial": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "adverseMedia": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "controversial": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string"
                              }
                            }
                          },
                          "registration": {
                            "type": "object",
                            "properties": {
                              "active": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "EligibilitySubscriptionWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "eligibility_subscription.updated"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "validationRequestId": {
                        "type": "string",
                        "nullable": true
                      },
                      "status": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "suggestedActivitySubTags": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      "results": {
                        "type": "object",
                        "properties": {
                          "eligibilityStatus": {
                            "type": "string"
                          },
                          "confirmedActivitySubTags": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "rejectedActivitySubTags": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "ValidationSubmissionWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "validation_submission.created",
                      "validation_submission.succeeded",
                      "validation_submission.failed",
                      "validation_submission.updated"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "agentVerificationId": {
                        "type": "string"
                      },
                      "agentVerification": {
                        "type": "object",
                        "description": "Nested agent-verification snapshot. firstName, lastName, and email may be redacted based on the configuration."
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "eligibilitySubscriptionId": {
                        "type": "string"
                      },
                      "monitoringSubscriptionId": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "partnerFields": {
                        "type": "object"
                      },
                      "validationSubmissionHostedConfigurationId": {
                        "type": "string"
                      },
                      "metadata": {
                        "type": "object"
                      },
                      "status": {
                        "type": "string"
                      },
                      "validationInviteId": {
                        "type": "string"
                      },
                      "validationRequestId": {
                        "type": "string"
                      },
                      "validationRequest": {
                        "type": "object"
                      },
                      "failureReasons": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        },
                        "description": "Present only for validation_submission.failed events"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "DonationWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "donation.hosted.payment_received",
                      "donation.created",
                      "donation.payment_successful",
                      "donation.settled",
                      "donation.disbursed",
                      "donation.cancelled",
                      "donation.reassigned"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "hosted": {
                        "type": "object",
                        "properties": {
                          "sessionId": {
                            "type": "string"
                          }
                        }
                      },
                      "amount": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "description": "Amount in cents (for hosted donations)"
                          },
                          {
                            "type": "object",
                            "description": "Amount object (for direct donations)",
                            "properties": {
                              "amount": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              }
                            }
                          }
                        ]
                      },
                      "currencyCode": {
                        "type": "string",
                        "description": "Currency code (for hosted donations)"
                      },
                      "status": {
                        "type": "string"
                      },
                      "firstName": {
                        "type": "string",
                        "description": "May be excluded based on partner settings"
                      },
                      "lastName": {
                        "type": "string",
                        "description": "May be excluded based on partner settings"
                      },
                      "email": {
                        "type": "string",
                        "description": "May be excluded based on partner settings"
                      },
                      "consentedToBeContactedByOrg": {
                        "type": "string"
                      },
                      "consentedToBeContacted": {
                        "type": "string"
                      },
                      "anonymous": {
                        "type": "string"
                      },
                      "giftAidId": {
                        "type": "string",
                        "nullable": true
                      },
                      "cancelledAt": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "metadata": {
                        "type": "object"
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "initial": {
                            "type": "boolean"
                          }
                        }
                      },
                      "donationRequestId": {
                        "type": "string"
                      },
                      "donationRequestAmount": {
                        "type": "object"
                      },
                      "accountId": {
                        "type": "string"
                      },
                      "settledAmount": {
                        "type": "object"
                      },
                      "settledAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "disbursedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "reassignedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "reassignedFromOrganisationId": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "MonetaryDonationVerificationWebhookEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "monetary_donation_verification.received",
                      "monetary_donation_verification.progressed"
                    ]
                  },
                  "eventData": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "organisationId": {
                        "type": "string",
                        "nullable": true
                      },
                      "status": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "approved",
                              "rejected",
                              "expired"
                            ]
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Present only when status type is rejected"
                          },
                          "awaitingAnswerFromOrganisation": {
                            "type": "boolean",
                            "description": "Present only when status type is pending"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "ScimError": {
        "type": "object",
        "description": "SCIM error response (`urn:ietf:params:scim:api:messages:2.0:Error`).",
        "properties": {
          "schemas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "urn:ietf:params:scim:api:messages:2.0:Error"
            ]
          },
          "status": {
            "type": "string",
            "description": "HTTP status code, as a string, per the SCIM spec.",
            "example": "400"
          },
          "scimType": {
            "type": "string",
            "description": "SCIM detail error keyword. Omitted for some statuses (e.g. plain 401/404).",
            "enum": [
              "invalidValue",
              "invalidFilter",
              "uniqueness"
            ],
            "example": "invalidValue"
          },
          "detail": {
            "type": "string",
            "description": "Human-readable description of the error.",
            "example": "body.userName Invalid email"
          }
        },
        "required": [
          "schemas",
          "status"
        ]
      },
      "EnterpriseUser": {
        "type": "object",
        "description": "Enterprise User extension\n(`urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`).\n",
        "properties": {
          "employeeNumber": {
            "type": "string",
            "example": "701984"
          },
          "costCenter": {
            "type": "string",
            "example": "4130"
          },
          "organization": {
            "type": "string",
            "example": "Goodstack"
          },
          "division": {
            "type": "string",
            "example": "Engineering"
          },
          "department": {
            "type": "string",
            "example": "Platform"
          },
          "manager": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "description": "The account id of the user's manager.",
                "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "GoodstackUser": {
        "type": "object",
        "description": "Goodstack User extension\n(`urn:ietf:params:scim:schemas:extension:goodstack:2.0:User`,\nschema name `GoodstackUser`). Both attributes are classified\nconfidential.\n",
        "properties": {
          "startDate": {
            "type": "string",
            "description": "The user's start date. On input, ONLY a `YYYY-MM-DD` date\n(e.g. `2014-04-06`) or a full RFC 3339 datetime\n(e.g. `2014-04-06T09:30:00Z`) is accepted. Any other format\n(slashes such as `06/04/2014`, compact `20140406`, or prose) is\nrejected with a SCIM `400` (`scimType: invalidValue`). On read, the\nvalue is returned normalized to ISO 8601, e.g. `2014-04-06` becomes\n`2014-04-06T00:00:00.000Z`.\n",
            "example": "2014-04-06T00:00:00.000Z"
          },
          "team": {
            "type": "string",
            "description": "Free-form team name for the user.",
            "example": "Platform Engineering"
          }
        }
      },
      "ScimUser": {
        "type": "object",
        "description": "SCIM Core User (`urn:ietf:params:scim:schemas:core:2.0:User`). Only the\nattributes below are supported; unsupported core attributes\n(`password`, `phoneNumbers`, `ims`, `photos`, `groups`, `entitlements`,\n`roles`, `x509Certificates`, `profileUrl`, and the\n`streetAddress`/`postalCode`/`formatted` address sub-attributes) are\ntruncated from the schema and ignored.\n",
        "properties": {
          "schemas": {
            "type": "array",
            "description": "The SCIM schema URNs declared on the resource.",
            "items": {
              "type": "string"
            },
            "example": [
              "urn:ietf:params:scim:schemas:core:2.0:User",
              "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
              "urn:ietf:params:scim:schemas:extension:goodstack:2.0:User"
            ]
          },
          "id": {
            "type": "string",
            "description": "The unique identifier of the user (read-only).",
            "example": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "externalId": {
            "type": "string",
            "description": "An identifier for the user defined by the provisioning client.",
            "example": "ext-12345"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata (read-only).",
            "properties": {
              "resourceType": {
                "type": "string",
                "example": "User"
              },
              "created": {
                "type": "string",
                "format": "date-time",
                "example": "2023-12-19T15:32:00.000Z"
              },
              "lastModified": {
                "type": "string",
                "format": "date-time",
                "example": "2023-12-19T15:32:00.000Z"
              },
              "location": {
                "type": "string",
                "example": "https://api.goodstack.io/scim/v2/Users/account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              }
            }
          },
          "userName": {
            "type": "string",
            "description": "The user's login identifier. Must be a valid email address.",
            "example": "johndoe@example.com"
          },
          "name": {
            "type": "object",
            "properties": {
              "formatted": {
                "type": "string",
                "example": "John Doe"
              },
              "familyName": {
                "type": "string",
                "example": "Doe"
              },
              "givenName": {
                "type": "string",
                "example": "John"
              },
              "middleName": {
                "type": "string"
              },
              "honorificPrefix": {
                "type": "string"
              },
              "honorificSuffix": {
                "type": "string"
              }
            }
          },
          "displayName": {
            "type": "string",
            "example": "John Doe"
          },
          "nickName": {
            "type": "string",
            "example": "Johnny"
          },
          "title": {
            "type": "string",
            "example": "Engineer"
          },
          "userType": {
            "type": "string",
            "example": "Employee"
          },
          "locale": {
            "type": "string",
            "example": "en-US"
          },
          "preferredLanguage": {
            "type": "string",
            "example": "en"
          },
          "timezone": {
            "type": "string",
            "example": "Europe/London"
          },
          "emails": {
            "type": "array",
            "description": "Email addresses for the user. On read a single primary work email is\nreturned (derived from `userName`).\n",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "example": "johndoe@example.com"
                },
                "display": {
                  "type": "string",
                  "description": "Human-readable display name for the email (read-only)."
                },
                "type": {
                  "type": "string",
                  "description": "A label for the email (free-form, e.g. `work`).",
                  "example": "work"
                },
                "primary": {
                  "type": "boolean",
                  "example": true
                }
              }
            }
          },
          "addresses": {
            "type": "array",
            "description": "Postal addresses. Only `type`, `primary`, `country`, `region` and\n`locality` are retained; `streetAddress`, `postalCode` and\n`formatted` are ignored.\n",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "example": "work"
                },
                "primary": {
                  "type": "boolean",
                  "example": true
                },
                "country": {
                  "type": "string",
                  "example": "GB"
                },
                "region": {
                  "type": "string",
                  "example": "England"
                },
                "locality": {
                  "type": "string",
                  "example": "London"
                }
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "Whether the user is active. Setting `false` deactivates the user.",
            "example": true
          },
          "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
            "$ref": "#/components/schemas/EnterpriseUser"
          },
          "urn:ietf:params:scim:schemas:extension:goodstack:2.0:User": {
            "$ref": "#/components/schemas/GoodstackUser"
          }
        }
      },
      "ScimListResponse": {
        "type": "object",
        "description": "SCIM list response envelope (`urn:ietf:params:scim:api:messages:2.0:ListResponse`).",
        "properties": {
          "schemas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "urn:ietf:params:scim:api:messages:2.0:ListResponse"
            ]
          },
          "totalResults": {
            "type": "integer",
            "example": 1
          },
          "startIndex": {
            "type": "integer",
            "example": 1
          },
          "itemsPerPage": {
            "type": "integer",
            "example": 20
          },
          "Resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScimUser"
            }
          }
        }
      }
    },
    "parameters": {
      "page": {
        "in": "query",
        "name": "page",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        },
        "description": "Page number, for pagination."
      },
      "pageSize": {
        "in": "query",
        "name": "pageSize",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 25
        },
        "description": "How many items per page, for pagination."
      },
      "cursor": {
        "in": "query",
        "name": "cursor",
        "required": false,
        "schema": {
          "type": "string",
          "example": "eyJ2IjoxLCJkIjoibmV4dCIsImlkIjoiZG9uYXRpb25fMDAwMDAwQnc3U1BhMHBxOHBRMFFsckVaWGFaN3AifQ%3D%3D"
        },
        "description": "A cursor that points to where to start the page"
      },
      "direction": {
        "in": "query",
        "name": "direction",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ]
        },
        "description": "Which way to sort by the given 'sort' field.  Default DESC"
      }
    },
    "responses": {
      "NotFound": {
        "description": "The specified resource was not found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "not_found"
                    },
                    "title": {
                      "type": "string",
                      "example": "Resource not found"
                    },
                    "message": {
                      "type": "string",
                      "example": "This endpoint is unavailable or can not be found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "forbidden"
                    },
                    "title": {
                      "type": "string",
                      "example": "Forbidden"
                    },
                    "message": {
                      "type": "string",
                      "example": "Access is denied due to insufficient privileges"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "UnsupportedContentType": {
        "description": "Unsupported Content Type",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "unsupported_content_type"
                    },
                    "title": {
                      "type": "string",
                      "example": "Unsupported Content Type"
                    },
                    "message": {
                      "type": "string",
                      "example": "The request has an unsupported content type"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "expected a type of: application/json, text/xml"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ContentTooLarge": {
        "description": "Content Too Large",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "content_too_large"
                    },
                    "title": {
                      "type": "string",
                      "example": "Content Too Large"
                    },
                    "message": {
                      "type": "string",
                      "example": "The request content is too large"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "maximum content size is 2MiB"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ForbiddenScope": {
        "description": "Forbidden (scope)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "forbidden"
                    },
                    "title": {
                      "type": "string",
                      "example": "Forbidden"
                    },
                    "message": {
                      "type": "string",
                      "example": "Access is denied due to missing scope permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "unauthorized"
                    },
                    "title": {
                      "type": "string",
                      "example": "Unauthorized"
                    },
                    "message": {
                      "type": "string",
                      "example": "Access is denied due to invalid credentials"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "bad_request"
                    },
                    "title": {
                      "type": "string",
                      "example": "Bad request"
                    },
                    "message": {
                      "type": "string",
                      "example": "Something is wrong with your request, please check any parameters and try again"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable entity",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "unprocessable_entity"
                    },
                    "title": {
                      "type": "string",
                      "example": "Unprocessable entity"
                    },
                    "message": {
                      "type": "string",
                      "example": "Request format is syntactically correct, but the server could not process the content due to logical issues or invalid data"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "IncorrectParams": {
        "description": "Error validating inputs",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "bad_request"
                    },
                    "title": {
                      "type": "string",
                      "example": "Bad request"
                    },
                    "message": {
                      "type": "string",
                      "example": "One or more of the inputs were invalid"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "pageSize must be greater than or equal to 0"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service unavailable error. It could mean, that the endpoint is temporarily not working because of internal communication issues.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "service_unavailable"
                    },
                    "title": {
                      "type": "string",
                      "example": "Service Unavailable"
                    },
                    "message": {
                      "type": "string",
                      "example": "Something went wrong on our servers, our engineers are working hard to fix it"
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Bank details validation failed with an unknown error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "conflict"
                    },
                    "title": {
                      "type": "string",
                      "example": "Conflict"
                    },
                    "message": {
                      "type": "string",
                      "example": "The request could not be completed due to a conflict with the current state of the target resource."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "internal_server_error"
                    },
                    "title": {
                      "type": "string",
                      "example": "Internal server error"
                    },
                    "message": {
                      "type": "string",
                      "example": "Something went wrong on our servers, our engineers are working hard to fix it"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ScimUnauthorized": {
        "description": "Unauthorized. The SCIM bearer key is missing or invalid, or the key is\nvalid but the partner does not have the `scim_api` scope enabled.\n",
        "content": {
          "application/scim+json": {
            "schema": {
              "$ref": "#/components/schemas/ScimError"
            },
            "examples": {
              "invalidKey": {
                "summary": "Missing or invalid key",
                "value": {
                  "schemas": [
                    "urn:ietf:params:scim:api:messages:2.0:Error"
                  ],
                  "status": "401"
                }
              },
              "scopeNotEnabled": {
                "summary": "Valid key, partner lacks the SCIM scope",
                "value": {
                  "schemas": [
                    "urn:ietf:params:scim:api:messages:2.0:Error"
                  ],
                  "status": "401",
                  "detail": "scim feature not enabled for this partner"
                }
              }
            }
          }
        }
      },
      "ScimBadRequest": {
        "description": "Bad request. Input validation failed or a filter could not be parsed.",
        "content": {
          "application/scim+json": {
            "schema": {
              "$ref": "#/components/schemas/ScimError"
            },
            "examples": {
              "invalidValue": {
                "value": {
                  "schemas": [
                    "urn:ietf:params:scim:api:messages:2.0:Error"
                  ],
                  "status": "400",
                  "scimType": "invalidValue",
                  "detail": "body.userName Invalid email"
                }
              },
              "invalidFilter": {
                "value": {
                  "schemas": [
                    "urn:ietf:params:scim:api:messages:2.0:Error"
                  ],
                  "status": "400",
                  "scimType": "invalidFilter",
                  "detail": "invalid filter: Unexpected token"
                }
              }
            }
          }
        }
      },
      "ScimNotFound": {
        "description": "Not found. The user does not exist, or exists but belongs to a different\npartner than the one the key is bound to. An invalid account id format\nalso resolves to `404`.\n",
        "content": {
          "application/scim+json": {
            "schema": {
              "$ref": "#/components/schemas/ScimError"
            },
            "example": {
              "schemas": [
                "urn:ietf:params:scim:api:messages:2.0:Error"
              ],
              "status": "404",
              "detail": "User not found"
            }
          }
        }
      },
      "ScimConflict": {
        "description": "Conflict. A user with this `userName` already exists for the partner.",
        "content": {
          "application/scim+json": {
            "schema": {
              "$ref": "#/components/schemas/ScimError"
            },
            "example": {
              "schemas": [
                "urn:ietf:params:scim:api:messages:2.0:Error"
              ],
              "status": "409",
              "scimType": "uniqueness",
              "detail": "User already exists"
            }
          }
        }
      }
    },
    "examples": {
      "ServiceUnavailable": {
        "summary": "503 Service unavailable",
        "value": {
          "error": {
            "code": "service_unavailable",
            "title": "Service Unavailable",
            "message": "Something went wrong on our servers, our engineers are working hard to fix it",
            "reasons": [
              "Bank details validation failed with an unknown error"
            ]
          }
        }
      },
      "NotFound": {
        "summary": "404 Not Found",
        "description": "The specified resource was not found",
        "value": {
          "error": {
            "code": "not_found",
            "title": "Resource not found",
            "message": "This endpoint is unavailable or can not be found"
          }
        }
      },
      "Forbidden": {
        "summary": "403 Forbidden",
        "description": "Forbidden",
        "value": {
          "error": {
            "code": "forbidden",
            "title": "Forbidden",
            "message": "Access is denied due to insufficient privileges"
          }
        }
      },
      "ForbiddenScope": {
        "summary": "403 Forbidden (Scope)",
        "description": "Forbidden - Missing scope permission",
        "value": {
          "error": {
            "code": "forbidden",
            "title": "Forbidden",
            "message": "Access is denied due to missing scope permissions"
          }
        }
      },
      "BadRequest": {
        "summary": "400 Bad Request",
        "description": "Bad Request",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "Something is wrong with your request, please check any parameters and try again"
          }
        }
      },
      "IncorrectParams": {
        "summary": "400 Incorrect Parameters",
        "description": "Bad Request - Incorrect parameters",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "One or more of the inputs were invalid",
            "reasons": [
              "pageSize must be greater than or equal to 0"
            ]
          }
        }
      },
      "Pagination.CursorError": {
        "summary": "Error in cursor parameter",
        "description": "We were unable to decode the cursor",
        "value": {
          "error": {
            "code": "pagination/cursor_error",
            "title": "Bad request",
            "message": "Unable to find the next page"
          }
        }
      },
      "Donations.GiftAidMissing": {
        "summary": "Donation - GiftAid missing",
        "description": "Can not find required gift aid for this donation",
        "value": {
          "error": {
            "code": "donation/gift_aid_missing",
            "title": "Bad request",
            "message": "Can not find required gift aid for this donation"
          }
        }
      },
      "Donations.MissingOrganisation": {
        "summary": "Donation - Organisation missing",
        "description": "User must be supporting a cause, or organisationId must be provided",
        "value": {
          "error": {
            "code": "donation/missing_organisation",
            "title": "Bad request",
            "message": "User must be supporting a cause, or organisationId must be provided"
          }
        }
      },
      "Donations.UserNotFound": {
        "summary": "Donation - User not found",
        "description": "User not found",
        "value": {
          "error": {
            "code": "donation/user_not_found",
            "title": "Bad request",
            "message": "User not found"
          }
        }
      },
      "Donations.InvalidState": {
        "summary": "Donation - Invalid state",
        "description": "Donation is not in a valid state to update",
        "value": {
          "error": {
            "code": "donation/invalid_state",
            "title": "Bad request",
            "message": "Donation is not in a valid state to update"
          }
        }
      },
      "Donations.WrongTargetCurrency": {
        "summary": "Donation - Wrong target currency",
        "description": "The organisation can not accept donations in this currency",
        "value": {
          "error": {
            "code": "donation/wrong_target_currency",
            "title": "Bad request",
            "message": "This organisation can not accept donations in GBP"
          }
        }
      },
      "Donations.WrongPartnerCurrency": {
        "summary": "Donation - Wrong partner currency",
        "description": "You can not accept donations in this currency",
        "value": {
          "error": {
            "code": "donation/wrong_partner_currency",
            "title": "Bad request",
            "message": "You can only donate in GBP"
          }
        }
      },
      "Donations.CannotAcceptDonations": {
        "summary": "Donation - Organisation can not accept donations",
        "description": "This Organisation can not accept donations at this time",
        "value": {
          "error": {
            "code": "donation/cannot_accept_donations",
            "title": "Bad request",
            "message": "This organisation is currently unable to accept donations"
          }
        }
      },
      "Donations.InvalidMetadata": {
        "summary": "400 Bad request",
        "description": "Metadata provided not correct format",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Metadata can only contain from 1 up to 20 keys, with key names up to 50 characters long and values up to 500 characters long",
            "code": "donation/invalid_metadata"
          }
        }
      },
      "Donations.InvalidTypeForEditOrganisation": {
        "summary": "Donation - Organisation cannot be updated for this type of donation",
        "description": "Organisation cannot be updated for this type of donation",
        "value": {
          "error": {
            "code": "donation/cannot_edit_organisation_invalid_donation_type",
            "title": "Bad request",
            "message": "Organisation cannot be updated for this type of donation"
          }
        }
      },
      "Idempotency.OriginalCallInProgress": {
        "summary": "Idempotency - Original call in progress",
        "description": "Original call with this idempotency key is still in progress, please wait and try again",
        "value": {
          "error": {
            "code": "idempotency/original_call_in_progress",
            "title": "Bad request",
            "message": "Original call with this idempotency key is still in progress"
          }
        }
      },
      "Idempotency.SameKeyDifferentData": {
        "summary": "Idempotency - Data has changed from previous request",
        "description": "Data has changed from previous request with this key",
        "value": {
          "error": {
            "code": "idempotency/same_key_different_data",
            "title": "Bad request",
            "message": "Data has changed from previous request"
          }
        }
      },
      "Idempotency.KeyInUse": {
        "summary": "Idempotency - Key in use",
        "description": "Idempotency Key is already in use",
        "value": {
          "error": {
            "code": "idempotency/key_already_in_use",
            "title": "Bad request",
            "message": "Idempotency Key is already in use"
          }
        }
      },
      "Upload.TooManyAttachments": {
        "summary": "Upload - Too many attachments",
        "description": "Too many files attached",
        "value": {
          "error": {
            "code": "upload/too_many_files",
            "title": "Bad request",
            "message": "Too many files attached (max: 1)"
          }
        }
      },
      "Upload.ContentTypeError": {
        "summary": "Upload - Content type error",
        "description": "Unsupported content type",
        "value": {
          "error": {
            "code": "upload/content_type_error",
            "title": "Bad request",
            "message": "Unsupported content type: xls"
          }
        }
      },
      "Upload.MaxFileSize": {
        "summary": "Upload - File exceeded max size",
        "description": "File exceeded max size for this endpoint",
        "value": {
          "error": {
            "code": "upload/max_file_size",
            "title": "Bad request",
            "message": "Request size exceeded maximum for this endpoint (5242880 bytes)"
          }
        }
      },
      "Upload.FiletypeNotSupported": {
        "summary": "Upload - Filetype not supported",
        "description": "Filetype not supported",
        "value": {
          "error": {
            "code": "upload/filetype_not_supported",
            "title": "Bad request",
            "message": "Filetype not supported.  Supported types include: pdf, png, jpg"
          }
        }
      },
      "Upload.MultipartBoundaryNotFound": {
        "summary": "Upload - Multipart boundary not found",
        "description": "Multipart boundary not found",
        "value": {
          "error": {
            "code": "upload/multipart_boundary_not_found",
            "title": "Bad request",
            "message": "Please provide multipart boundary"
          }
        }
      },
      "Upload.FileIsMissing": {
        "summary": "Upload - File is missing",
        "description": "File is missing",
        "value": {
          "error": {
            "code": "upload/file_is_missing",
            "title": "Bad request",
            "message": "File is missing. File is a required field"
          }
        }
      },
      "GiftAid.UserNotFound": {
        "summary": "GiftAid - User not found",
        "description": "GiftAid - User not found",
        "value": {
          "error": {
            "code": "gift_aid/user_not_found",
            "title": "Bad request",
            "message": "User not found"
          }
        }
      },
      "Auth.AccountExists": {
        "summary": "Account exists",
        "description": "The specified account already exists",
        "value": {
          "error": {
            "code": "auth/invalid_credentials_1",
            "title": "Bad request",
            "message": "The account credentials supplied are invalid"
          }
        }
      },
      "Auth.AccountNotFound": {
        "summary": "Account not found",
        "description": "The account for specified email does not exist",
        "value": {
          "error": {
            "code": "auth/invalid_credentials_3",
            "title": "Bad request",
            "message": "If you have an account with Percent we have sent you an email"
          }
        }
      },
      "Auth.TooManyChangePasswordRequests": {
        "summary": "Too many change password requests",
        "description": "Too many requests to change password",
        "value": {
          "error": {
            "code": "auth/too_many_change_password_requests",
            "title": "Forbidden",
            "message": "Too many requests to change password"
          }
        }
      },
      "Auth.PasswordWasUsed": {
        "summary": "The password is unsafe",
        "description": "The password is unsafe",
        "value": {
          "error": {
            "code": "auth/password_unsafe_2",
            "title": "Bad request",
            "message": "The password is unsafe"
          }
        }
      },
      "Auth.InvalidCredentials": {
        "summary": "Invalid account credentials",
        "description": "Invalid account credentials",
        "value": {
          "error": {
            "code": "auth/invalid_credentials_2",
            "title": "Bad request",
            "message": "The account credentials supplied are invalid"
          }
        }
      },
      "Auth.LinkExpired": {
        "summary": "Password reset link expired",
        "description": "Password reset link expired",
        "value": {
          "error": {
            "code": "auth/link_expired",
            "title": "Bad request",
            "message": "The link has expired"
          }
        }
      },
      "Auth.LinkInvalid": {
        "summary": "Password reset link invalid",
        "description": "Password reset link invalid",
        "value": {
          "error": {
            "code": "auth/link_invalid",
            "title": "Bad request",
            "message": "The link is invalid"
          }
        }
      },
      "Auth.ForbiddenPassword": {
        "summary": "The password is forbidden",
        "description": "The password is forbidden",
        "value": {
          "error": {
            "code": "auth/forbidden_password",
            "title": "Bad request",
            "message": "The password is forbidden"
          }
        }
      },
      "Auth.AccountUnverified": {
        "summary": "Account not verified",
        "description": "Account not verified",
        "value": {
          "error": {
            "code": "auth/invalid_credentials_4",
            "title": "Bad request",
            "message": "The account credentials supplied are invalid"
          }
        }
      },
      "Auth.TwoFaAlreadyConfigured": {
        "summary": "Two factor authentication already setup",
        "description": "Two factor authentication already setup",
        "value": {
          "error": {
            "code": "auth/two_fa_already_configured",
            "title": "Bad request",
            "message": "Two factor authentication has already been setup for this account"
          }
        }
      },
      "Auth.InvalidTwoFaOtpCode": {
        "summary": "Invalid otp code provided for two factor authentication",
        "description": "Invalid otp code provided for two factor authentication",
        "value": {
          "error": {
            "code": "auth/two_fa_invalid_otp_code",
            "title": "Bad request",
            "message": "Please provide a valid otp code"
          }
        }
      },
      "Auth.TwoFaNotEnabled": {
        "summary": "Two factor authentication not enabled for this account",
        "description": "Two factor authentication not enabled for this account",
        "value": {
          "error": {
            "code": "auth/two_fa_not_enabled",
            "title": "Bad request",
            "message": "Two factor authentication not enabled for this account"
          }
        }
      },
      "Auth.InvalidTwoFaRecoveryCode": {
        "summary": "Invalid recovery code provided for two factor authentication",
        "description": "Invalid recovery code provided for two factor authentication",
        "value": {
          "error": {
            "code": "auth/two_fa_invalid_recovery_code",
            "title": "Bad request",
            "message": "Please provide a valid recovery code"
          }
        }
      },
      "Auth.TwoFaAuthenticationFailed": {
        "summary": "Two factor authentication token invalid",
        "description": "Two factor authentication token invalid",
        "value": {
          "error": {
            "code": "auth/two_fa_authentication_failed",
            "title": "Bad request",
            "message": "Two factor authentication token invalid"
          }
        }
      },
      "Auth.TwoFaOtpCodeRequired": {
        "summary": "Requires 2FA to login. Submit valid OTP code to /verify",
        "description": "Requires 2FA to login. Submit valid OTP code to /verify",
        "value": {
          "error": {
            "code": "auth/requires_two_fa_login",
            "title": "Bad request",
            "message": "Requires 2FA to login. Submit valid OTP code to /verify"
          }
        }
      },
      "Auth.TwoFaSetupRequired": {
        "summary": "2FA setup mandatory. Enable 2FA to continue",
        "description": "2FA setup mandatory. Enable 2FA to continue",
        "value": {
          "error": {
            "code": "auth/requires_two_fa_setup",
            "title": "Bad request",
            "message": "2FA setup mandatory. Enable 2FA to continue"
          }
        }
      },
      "Auth.PasswordIsUnsafe": {
        "summary": "Password is unsafe",
        "description": "Password is unsafe",
        "value": {
          "error": {
            "code": "auth/password_unsafe_1",
            "title": "Bad request",
            "message": "The password is unsafe"
          }
        }
      },
      "Auth.AccountHasActiveSession": {
        "summary": "Account has active session",
        "description": "Account has active session",
        "value": {
          "error": {
            "code": "auth/account_has_active_session",
            "title": "Bad request",
            "message": "Account already has active session"
          }
        }
      },
      "Auth.RecaptchaChallenge": {
        "summary": "Recaptcha challenge not passed",
        "description": "The recaptcha token is missing, or Google did not verify it.",
        "value": {
          "error": {
            "code": "auth/recaptcha_challenge",
            "title": "Bad request",
            "message": "Recaptcha challenge"
          }
        }
      },
      "Auth.InvalidRecaptchaConnection": {
        "summary": "Failed recaptcha challenge",
        "description": "The recaptcha response parameter is invalid or malformed.",
        "value": {
          "error": {
            "code": "auth/invalid_recaptcha_connection",
            "title": "Service Unavailable",
            "message": "Invalid recaptcha connection"
          }
        }
      },
      "IAM.InvalidCaptchaToken": {
        "summary": "Captcha test not passed",
        "description": "The captcha token is missing, or Google did not verify it.",
        "value": {
          "error": {
            "code": "iam/invalid_captcha_token",
            "title": "Bad request",
            "message": "User has failed the captcha test"
          }
        }
      },
      "Auth.PasswordIsTooShort": {
        "summary": "Password is too short",
        "description": "Password must be at least 8 characters",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "One or more of the inputs were invalid",
            "reasons": [
              "body.password must be at least 8 characters"
            ]
          }
        }
      },
      "Auth.PasswordIsTooLong": {
        "summary": "Password is too long",
        "description": "Password must be at most 64 characters",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "One or more of the inputs were invalid",
            "reasons": [
              "body.password must be at most 64 characters"
            ]
          }
        }
      },
      "Auth.PasswordPolicy": {
        "summary": "Password policy not fulfilled",
        "description": "Password must contain at least one lowercase letter, one uppercase letter, one numeric digit, and one special",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "One or more of the inputs were invalid",
            "reasons": [
              "body.password must contain at least one lowercase letter, one uppercase letter, one numeric digit, and one special"
            ]
          }
        }
      },
      "Auth.EmailInvalid": {
        "summary": "Invalid email",
        "description": "Email must be a valid email",
        "value": {
          "error": {
            "code": "bad_request",
            "title": "Bad request",
            "message": "One or more of the inputs were invalid",
            "reasons": [
              "body.email must be a valid email"
            ]
          }
        }
      },
      "Auth.RateExceeded": {
        "summary": "Too many requests to auth endpoints from one user",
        "description": "Too many requests to auth endpoints from one user",
        "value": {
          "error": {
            "code": "rate_exceeded",
            "title": "Too Many Requests",
            "message": "Too many requests hit the API too quickly. Please try again later."
          }
        }
      },
      "Vetting.OrganisationNotFound": {
        "summary": "Organisation Not Found",
        "description": "Organisation Not Found",
        "value": {
          "error": {
            "code": "vetting/organisation_not_found",
            "title": "Bad request",
            "message": "Organisation was not found"
          }
        }
      },
      "Milestone.OrganisationNoCurrency": {
        "summary": "OrganisationNoCurrency",
        "description": "Milestone cannot be created for organisation as currency is not set for organisation",
        "value": {
          "error": {
            "code": "milestone/organisation_no_currency",
            "title": "Bad request",
            "message": "Milestone cannot be created for organisation as currency is not set for organisation"
          }
        }
      },
      "Monitoring.DuplicatedScope": {
        "summary": "Duplicated scope in flags array",
        "description": "Duplicated scope in flags array",
        "value": {
          "error": {
            "code": "monitoring/duplicated_scope",
            "title": "Bad request",
            "message": "Duplicated scope in flags array"
          }
        }
      },
      "Monitoring.MissingFlagForPendingEvent": {
        "summary": "Missing flag for pending event",
        "description": "Missing flag for pending event",
        "value": {
          "error": {
            "code": "monitoring/missing_flag_for_pending_event",
            "title": "Bad request",
            "message": "Missing flag for pending event"
          }
        }
      },
      "MonitoringSubscription.EntityNotFound": {
        "summary": "Subscription Entity Not Found",
        "description": "Subscription Entity Not Found",
        "value": {
          "error": {
            "code": "monitoring_subscription/entity_not_found",
            "title": "Bad request",
            "message": "Organisation or validation request was not found"
          }
        }
      },
      "MonitoringSubscription.MonitoringSubscriptionAlreadyCancelled": {
        "summary": "Monitoring Subscription already cancelled",
        "description": "Monitoring Subscription already cancelled",
        "value": {
          "error": {
            "code": "monitoring_subscription/monitoring_subscription_already_cancelled",
            "title": "Bad request",
            "message": "Monitoring subscription is already cancelled"
          }
        }
      },
      "MonitoringSubscription.OrganisationNotActive": {
        "summary": "400 Bad request",
        "description": "Organisation is not active",
        "value": {
          "error": {
            "code": "monitoring_subscription/organisation_not_active",
            "title": "Bad request",
            "message": "Organisation is not active"
          }
        }
      },
      "Partners.PartnerIdNotFound": {
        "summary": "Partner not found",
        "description": "Partner not found",
        "value": {
          "error": {
            "code": "partners/not_found",
            "title": "Bad request",
            "message": "partner not found"
          }
        }
      },
      "EligibilitySubscription.EntityNotFound": {
        "summary": "Subscription Entity Not Found",
        "description": "Subscription Entity Not Found",
        "value": {
          "error": {
            "code": "eligibility_subscription/entity_not_found",
            "title": "Bad request",
            "message": "Organisation or validation request was not found"
          }
        }
      },
      "EligibilitySubscription.InvalidMetadata": {
        "summary": "400 Bad request",
        "description": "Metadata provided not correct format",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Metadata can only contain from 1 up to 20 keys, with key names up to 50 characters long and values up to 500 characters long",
            "code": "eligibility_subscription/invalid_metadata"
          }
        }
      },
      "EligibilitySubscription.EligibilitySubscriptionAlreadyCancelled": {
        "summary": "Eligibility Subscription already cancelled",
        "description": "Eligibility Subscription already cancelled",
        "value": {
          "error": {
            "code": "eligibility_subscription/already_cancelled",
            "title": "Bad request",
            "message": "Eligibility Subscription already cancelled"
          }
        }
      },
      "EligibilitySubscription.OrganisationNotActive": {
        "summary": "400 Bad request",
        "description": "Organisation is not active",
        "value": {
          "error": {
            "code": "eligibility_subscription/organisation_not_active",
            "title": "Bad request",
            "message": "Organisation is not active"
          }
        }
      },
      "EligibilitySubscription.InvalidSubTags": {
        "summary": "400 Bad request",
        "description": "At least one of provided suggested subtags is invalid",
        "value": {
          "error": {
            "code": "eligibility_subscription/invalid_sub_tags",
            "title": "Bad request",
            "message": "At least one of provided suggested subtags is invalid"
          }
        }
      },
      "ActivityEvent.OrganisationNotFound": {
        "summary": "Organisation Not Found",
        "description": "Organisation Not Found",
        "value": {
          "error": {
            "code": "activity_event/organisation_not_found",
            "title": "Bad request",
            "message": "Organisation was not found"
          }
        }
      },
      "ValidationInvite.ExpiredValidationInvite": {
        "summary": "Validation Invite has expired",
        "description": "Validation Invite has expired",
        "value": {
          "error": {
            "code": "validation_invite/validation_invite_expired",
            "title": "Bad request",
            "message": "Validation Invitation is expired"
          }
        }
      },
      "ValidationSubmissionDocument.ValidationInviteNotFound": {
        "summary": "400 Bad request",
        "description": "Validation invite not found",
        "value": {
          "error": {
            "code": "validation_submission_document/validation_invite_not_found",
            "title": "Bad request",
            "message": "validation invite not found"
          }
        }
      },
      "ValidationSubmissionDocument.ValidationSubmissionNotFound": {
        "summary": "400 Bad request",
        "description": "Validation submission not found",
        "value": {
          "error": {
            "code": "validation_submission_document/validation_submission_not_found",
            "title": "Bad request",
            "message": "validation submission not found"
          }
        }
      },
      "ValidationSubmission.OrganisationNotFound": {
        "summary": "400 Bad request",
        "description": "Organisation was not found",
        "value": {
          "error": {
            "code": "validation_submission/organisation_not_found",
            "title": "Bad request",
            "message": "Organisation was not found"
          }
        }
      },
      "ValidationSubmission.OrganisationNotActive": {
        "summary": "400 Bad request",
        "description": "Organisation is not active",
        "value": {
          "error": {
            "code": "validation_submission/organisation_not_active",
            "title": "Bad request",
            "message": "Organisation is not active"
          }
        }
      },
      "ValidationSubmission.ValidationSubmissionDocumentNotFound": {
        "summary": "400 Bad request",
        "description": "Validation submission document was not found",
        "value": {
          "error": {
            "code": "validation_submission/validation_submission_document_not_found",
            "title": "Bad request",
            "message": "Validation submission document was not found"
          }
        }
      },
      "ValidationSubmission.ValidationRequestNotFound": {
        "summary": "400 Bad request",
        "description": "Validation request not found",
        "value": {
          "error": {
            "code": "validation_submission/validation_request_not_found",
            "title": "Bad request",
            "message": "Validation request was not found"
          }
        }
      },
      "ValidationSubmission.ValidationRequestAlreadyRejected": {
        "summary": "400 Bad request",
        "description": "Validation request already rejected",
        "value": {
          "error": {
            "code": "validation_submission/validation_request_already_rejected",
            "title": "Bad request",
            "message": "Validation request already rejected"
          }
        }
      },
      "ValidationSubmission.EntityNotFound": {
        "summary": "400 Bad request",
        "description": "Organisation or validation request was not found",
        "value": {
          "error": {
            "code": "validation_submission/entity_not_found",
            "title": "Bad request",
            "message": "Organisation or validation request was not found"
          }
        }
      },
      "ValidationSubmission.InvalidSubTags": {
        "summary": "400 Bad request",
        "description": "At least one of provided subtags is invalid",
        "value": {
          "error": {
            "code": "validation_submission/invalid_sub_tags",
            "title": "Bad request",
            "message": "At least one of provided subtags is invalid"
          }
        }
      },
      "ValidationSubmission.ValidationInviteNotFound": {
        "summary": "400 Bad request",
        "description": "Validation invite not found",
        "value": {
          "error": {
            "code": "validation_submission/validation_invite_not_found",
            "title": "Bad request",
            "message": "Validation invite not found"
          }
        }
      },
      "ValidationSubmission.ValidationInviteInvalidState": {
        "summary": "400 Bad request",
        "description": "You can create a validation submission only with an open validation invite",
        "value": {
          "error": {
            "code": "validation_submission/validation_invite_invalid_state",
            "title": "Bad request",
            "message": "You can create a validation submission only with an open validation invite"
          }
        }
      },
      "ValidationSubmission.ProvidedBothConfigurationAndInvite": {
        "summary": "400 Bad request",
        "description": "You cannot provide both configuration id and validationInviteId",
        "value": {
          "error": {
            "code": "validation_submission/invalid_payload_config_invite_id",
            "title": "Bad request",
            "message": "You cannot provide both configuration id and validationInviteId"
          }
        }
      },
      "ValidationSubmission.NoConfigurationForPartner": {
        "summary": "400 Bad request",
        "description": "No configuration specified for your account. Please contact Percent to resolve this issue",
        "value": {
          "error": {
            "code": "validation_submission/no_configuration_for_partner",
            "title": "Bad request",
            "message": "No configuration specified for your account. Please contact Percent to resolve this issue"
          }
        }
      },
      "ValidationSubmission.InvalidConfiguration": {
        "summary": "404 Not Found",
        "description": "Provided configurationId is not valid",
        "value": {
          "error": {
            "code": "validation_submission/invalid_configuration_id",
            "title": "Not Found",
            "message": "Provided configurationId is not valid"
          }
        }
      },
      "ActivityEvent.InvalidSubTags": {
        "summary": "400 Bad request",
        "description": "At least one of provided subtags is invalid",
        "value": {
          "error": {
            "code": "activity_event/invalid_sub_tags",
            "title": "Bad request",
            "message": "At least one of provided subtags is invalid"
          }
        }
      },
      "ActivityEvent.EligibilityAlreadyDefined": {
        "summary": "400 Bad request",
        "description": "Eligibility is already defined and cannot be changed to nondefinable",
        "value": {
          "error": {
            "code": "activity_event/eligibility_already_defined",
            "title": "Bad request",
            "message": "Eligibility is already defined and cannot be changed to nondefinable"
          }
        }
      },
      "AgentVerification.InvalidMetadata": {
        "summary": "400 Bad request",
        "description": "Metadata provided not correct format",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Metadata can only contain from 1 up to 20 keys, with key names up to 50 characters long and values up to 500 characters long",
            "code": "agent_verification/invalid_metadata"
          }
        }
      },
      "AgentVerificationDocument.AgentVerificationInvalidToken": {
        "summary": "400 Bad request",
        "description": "Agent verification token is invalid or was tempered with",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Agent verification token is invalid or was tempered with",
            "code": "agent_verification_document_upload/invalid_token"
          }
        }
      },
      "DonationSession.OrganisationNotFound": {
        "summary": "400 Bad request",
        "description": "Organisation not found",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Organisation not found",
            "code": "donation_session/organisation_not_found"
          }
        }
      },
      "DonationSession.InvalidMetadata": {
        "summary": "400 Bad request",
        "description": "Metadata provided not correct format",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Metadata can only contain from 1 up to 20 keys, with key names up to 50 characters long and values up to 500 characters long",
            "code": "donation_session/invalid_metadata"
          }
        }
      },
      "DonationSession.InvalidAccountDetails": {
        "summary": "400 Bad request",
        "description": "Invalid account details",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Invalid account details: missing full name and/or preferred name",
            "code": "donation_session/invalid_account_details"
          }
        }
      },
      "DonationSession.DonationLinkReferenceConflict": {
        "summary": "400 Bad request",
        "description": "Conflicting donation link references",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Donation link reference not supplied or does not match path parameter",
            "code": "donation_session/donation_link_reference_conflict"
          }
        }
      },
      "DonationLink.OrganisationNotFound": {
        "summary": "400 Bad request",
        "description": "Organisation not found",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Organisation not found",
            "code": "donation_link/organisation_not_found"
          }
        }
      },
      "DonationLink.MissingOrganisationInformation": {
        "summary": "400 Bad request",
        "description": "Missing organisation information",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Organisation information missing",
            "code": "donation_link/missing_organisation_information"
          }
        }
      },
      "DonationLink.ConflictingOrganisationInformation": {
        "summary": "400 Bad request",
        "description": "Conflicting organisation information",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Organisation can only be specified either through donation link or donation session, not both",
            "code": "donation_link/conflicting_organisation_information"
          }
        }
      },
      "DonationLink.CurrencyNotSupported": {
        "summary": "400 Bad request",
        "description": "Currency not supported",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Currency not supported",
            "code": "donation_link/currency_not_supported"
          }
        }
      },
      "DonationLink.CurrencyNotSupplied": {
        "summary": "400 Bad request",
        "description": "Currency not supplied",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Currency not supplied",
            "code": "donation_link/currency_not_supplied"
          }
        }
      },
      "Experience.OrganisationImage.ImageValidationConfigurationNotFound": {
        "summary": "400 Bad request",
        "description": "Currency not supplied",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Image validation configuration was not found",
            "code": "organisation_image/image_validation_configuration_id_not_found"
          }
        }
      },
      "Experience.OrganisationImage.ImageDimensionsInvalid": {
        "summary": "400 Bad request",
        "description": "Currency not supplied",
        "value": {
          "error": {
            "title": "Bad request",
            "message": "Image dimensions are invalid",
            "code": "organisation_image/invalid_image_dimensions",
            "reasons": [
              "Image width is too low. Minimum is 800"
            ]
          }
        }
      }
    }
  }
}