{
  "$schema": "http://interagent.github.io/interagent-hyper-schema",
  "type": [
    "object"
  ],
  "definitions": {
    "common": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Common definitions",
      "definitions": {
        "allow_organisation_contact": {
          "description": "If the person has consented to be contacted by the organisation",
          "example": true,
          "type": [
            "boolean"
          ]
        },
        "state": {
          "description": "The state of the resource",
          "example": "published",
          "type": [
            "string"
          ]
        },
        "partner_data": {
          "description": "An object containing data from partner systems. Structure varies depending on the partner.",
          "type": [
            "object"
          ]
        },
        "custom_form_values": {
          "description": "An object containing values for custom form fields. Structure varies depending on the customer.",
          "type": [
            "object"
          ]
        },
        "id": {
          "description": "unique identifier",
          "example": 1234567,
          "type": [
            "string"
          ]
        },
        "identity": {
          "$ref": "#/definitions/common/definitions/id"
        },
        "created_at": {
          "description": "when resource was created",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "updated_at": {
          "description": "when resource was updated",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "url": {
          "example": "https://url.example.net",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "html_url": {
          "$ref": "#/definitions/common/definitions/url"
        },
        "amount": {
          "type": [
            "object"
          ],
          "properties": {
            "cents": {
              "description": "Numeric amount in cents",
              "example": 1234500,
              "type": [
                "integer"
              ]
            },
            "currency": {
              "description": "3 character currency code, as specified in ISO 4217",
              "example": "EUR",
              "pattern": "^([A-Z]{3})$",
              "type": [
                "string"
              ]
            }
          }
        },
        "donate_url": {
          "$ref": "#/definitions/common/definitions/url"
        },
        "new_fundraiser_url": {
          "$ref": "#/definitions/common/definitions/url"
        },
        "cover_media": {
          "description": "The image or video to be displayed for this resource.",
          "type": [
            "object"
          ],
          "properties": {
            "image": {
              "type": [
                "object"
              ],
              "properties": {
                "url": {
                  "description": "The url for the image. On the BetterNow site, the video takes precedence if both exist. 461x306 pixels",
                  "example": "https://cnd.example.net/image.jpg",
                  "$ref": "#/definitions/common/definitions/url"
                }
              }
            },
            "video": {
              "type": [
                "object"
              ],
              "properties": {
                "url": {
                  "description": "The url for the video. Currently only YouTube and Vimeo are supported. Could be blank.",
                  "example": "https://youtu.be/12345",
                  "$ref": "#/definitions/common/definitions/url"
                },
                "oembed_html": {
                  "description": "The OEmbed HTML to display the video. Could be blank.",
                  "example": "<iframe width=\\\"480\\\" height=\\\"270\\\" src=\\\"https://www.youtube.com/embed/G1JBOSwjN6Q?feature=oembed\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>",
                  "type": [
                    "string"
                  ]
                }
              }
            },
            "thumb": {
              "type": [
                "object"
              ],
              "properties": {
                "url": {
                  "description": "The url for the cover media that should be displayed in e.g. a card view. 120x80 pixels",
                  "example": "https://cnd.example.net/image.jpg",
                  "$ref": "#/definitions/common/definitions/url"
                }
              }
            }
          }
        },
        "headline": {
          "example": "My Headline For My Page",
          "type": [
            "string"
          ]
        },
        "name": {
          "example": "A Name",
          "type": [
            "string"
          ]
        },
        "description": {
          "example": "<p>This is really, <b>REALLY</b> great</p> <br><br>",
          "type": [
            "string"
          ]
        },
        "slug": {
          "example": "some-simple-slug",
          "pattern": "^([a-z0-9-]{2,})$",
          "type": [
            "string"
          ]
        },
        "logo_url": {
          "$ref": "#/definitions/common/definitions/url"
        },
        "recipient": {
          "description": "The organisation receiving the donation or contact permission",
          "type": [
            "object"
          ],
          "properties": {
            "id": {
              "$ref": "#/definitions/organisation/definitions/id"
            },
            "name": {
              "$ref": "#/definitions/organisation/definitions/name"
            },
            "url": {
              "$ref": "#/definitions/organisation/definitions/url"
            },
            "html_url": {
              "$ref": "#/definitions/organisation/definitions/html_url"
            }
          }
        }
      },
      "description": "Common definitions used by multiple resources",
      "type": [
        "object"
      ]
    },
    "donation-detail": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Donation Details",
      "definitions": {
        "amount": {
          "$ref": "#/definitions/donation/definitions/amount"
        },
        "id": {
          "$ref": "#/definitions/donation/definitions/id"
        },
        "identity": {
          "$ref": "#/definitions/donation/definitions/id"
        },
        "created_at": {
          "$ref": "#/definitions/donation/definitions/created_at"
        },
        "name_shown": {
          "$ref": "#/definitions/donation/definitions/name"
        },
        "comment": {
          "$ref": "#/definitions/donation/definitions/comment"
        },
        "avatar_url": {
          "$ref": "#/definitions/user/definitions/avatar_url"
        },
        "url": {
          "$ref": "#/definitions/donation/definitions/private_details_url"
        },
        "updated_at": {
          "$ref": "#/definitions/donation/definitions/updated_at"
        },
        "fundraiser": {
          "$ref": "#/definitions/fundraiser/definitions/fundraiser_summary"
        },
        "recipient": {
          "$ref": "#/definitions/common/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/team/definitions/team_summary"
        },
        "event": {
          "$ref": "#/definitions/event/definitions/event_summary"
        },
        "project": {
          "$ref": "#/definitions/project/definitions/project_summary"
        },
        "email": {
          "$ref": "#/definitions/person/definitions/email"
        },
        "phone": {
          "$ref": "#/definitions/person/definitions/phone"
        },
        "company_name": {
          "example": "BetterNow Worldwide ApS",
          "type": [
            "string"
          ]
        },
        "legal_name": {
          "example": "BetterNow LTD",
          "type": [
            "string"
          ]
        },
        "donor_type": {
          "example": "personal",
          "type": [
            "string"
          ],
          "enum": [
            "unknown",
            "personal",
            "organisation"
          ]
        },
        "first_name": {
          "description": "The first name on the donation",
          "example": "Firstname",
          "type": [
            "string"
          ]
        },
        "middle_name": {
          "description": "The middle name on the donation (not available in all regions)",
          "example": "Middlename",
          "type": [
            "string"
          ]
        },
        "last_name": {
          "description": "The last name on the donation",
          "example": "Lastname",
          "type": [
            "string"
          ]
        },
        "tax_id": {
          "description": "country-specific tax identification number",
          "type": [
            "string"
          ]
        },
        "tax_deduction_requested": {
          "example": false,
          "description": "whether the donor requested a tax deduction (or Gift Aid in UK)",
          "type": [
            "boolean"
          ]
        },
        "donor_ip_address": {
          "example": "127.0.0.1",
          "type": [
            "string"
          ]
        },
        "allow_organisation_contact": {
          "description": "Has the donor given permission for the recipient of the donation to contact them?",
          "type": [
            "boolean"
          ]
        },
        "allow_site_contact": {
          "description": "Has the donor given permission for the operator of the site on which the donation was given to contact them?",
          "type": [
            "boolean"
          ]
        },
        "hidden_name": {
          "description": "Has the donor requested to hide their name (donate anonymously on the public site)?",
          "type": [
            "boolean"
          ]
        },
        "address": {
          "type": [
            "object"
          ],
          "properties": {
            "street_line_1": {
              "example": "Danneskiold-Samsøes Allé 41",
              "type": [
                "string"
              ]
            },
            "street_line_2": {
              "example": "Suite 103",
              "type": [
                "string"
              ]
            },
            "city": {
              "example": "Copenhagen K",
              "type": [
                "string"
              ]
            },
            "postal_code": {
              "example": "1434",
              "type": [
                "string"
              ]
            },
            "province": {
              "example": "Region Hovedstaden",
              "type": [
                "string"
              ]
            },
            "country": {
              "pattern": "^([A-Z]{2})$",
              "description": "ISO alpha-2 country code",
              "example": "DK",
              "type": [
                "string"
              ]
            }
          }
        },
        "your_reference": {
          "$ref": "#/definitions/project/definitions/your_reference"
        },
        "donor_reference": {
          "description": "A reference entered by the donor",
          "example": "Christmas Donation",
          "type": [
            "string"
          ]
        },
        "form_type": {
          "example": "online_form",
          "type": [
            "string"
          ],
          "enum": [
            "online_form",
            "door_to_door_form"
          ]
        },
        "custom_form_values": {
          "$ref": "#/definitions/common/definitions/custom_form_values"
        },
        "payment": {
          "type": [
            "object"
          ],
          "properties": {
            "processor_id": {
              "description": "the payment processor's id for the payment",
              "example": "123456789",
              "type": [
                "string"
              ]
            },
            "secondary_processor_id": {
              "description": "an optional secondary id for the payment from the processor. Currently only used for payments imported via the Vipps/MobilePay Report API",
              "example": "123456789",
              "type": [
                "string"
              ]
            },
            "payment_id_for_processor": {
              "description": "the id we send to the payment processor and acquirer",
              "example": "12345-slyellei_0",
              "type": [
                "string"
              ]
            },
            "settled_by_betternow": {
              "description": "If BetterNow transfers the money to you",
              "example": false,
              "type": [
                "boolean"
              ]
            },
            "acquirer": {
              "description": "What company acquires the payment",
              "example": "clearhaus",
              "type": [
                "string"
              ]
            },
            "type": {
              "description": "The payment type",
              "example": "invoiced_payment",
              "type": [
                "string"
              ]
            },
            "methods": {
              "description": "The payment methods chosen when the donation was created",
              "example": "credit_card",
              "type": [
                "string"
              ]
            }
          }
        },
        "analytics": {
          "description": "UTM parameters for analytics",
          "type": [
            "object"
          ],
          "properties": {
            "utm_source": {
              "type": [
                "string"
              ]
            },
            "utm_medium": {
              "type": [
                "string"
              ]
            },
            "utm_term": {
              "type": [
                "string"
              ]
            },
            "utm_content": {
              "type": [
                "string"
              ]
            },
            "utm_campaign": {
              "type": [
                "string"
              ]
            }
          }
        }
      },
      "description": "The private details about a donation. Includes Personal data. A secret key is required to access this information.",
      "links": [
        {
          "description": "Info for existing donation.",
          "href": "/donation-details/{(%23%2Fdefinitions%2Fdonation%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        }
      ],
      "properties": {
        "amount": {
          "$ref": "#/definitions/donation-detail/definitions/amount"
        },
        "comment": {
          "$ref": "#/definitions/donation-detail/definitions/comment"
        },
        "name_shown": {
          "$ref": "#/definitions/donation-detail/definitions/name_shown"
        },
        "hidden_name": {
          "$ref": "#/definitions/donation-detail/definitions/hidden_name"
        },
        "first_name": {
          "$ref": "#/definitions/donation-detail/definitions/first_name"
        },
        "middle_name": {
          "$ref": "#/definitions/donation-detail/definitions/middle_name"
        },
        "last_name": {
          "$ref": "#/definitions/donation-detail/definitions/last_name"
        },
        "company_name": {
          "$ref": "#/definitions/donation-detail/definitions/company_name"
        },
        "legal_name": {
          "$ref": "#/definitions/donation-detail/definitions/legal_name"
        },
        "donor_type": {
          "$ref": "#/definitions/donation-detail/definitions/donor_type"
        },
        "tax_id": {
          "$ref": "#/definitions/donation-detail/definitions/tax_id"
        },
        "tax_deduction_requested": {
          "$ref": "#/definitions/donation-detail/definitions/tax_deduction_requested"
        },
        "created_at": {
          "$ref": "#/definitions/donation-detail/definitions/created_at"
        },
        "id": {
          "$ref": "#/definitions/donation-detail/definitions/id"
        },
        "updated_at": {
          "$ref": "#/definitions/donation-detail/definitions/updated_at"
        },
        "address": {
          "$ref": "#/definitions/donation-detail/definitions/address"
        },
        "fundraiser": {
          "$ref": "#/definitions/donation-detail/definitions/recipient"
        },
        "recipient": {
          "$ref": "#/definitions/donation-detail/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/donation-detail/definitions/team"
        },
        "project": {
          "$ref": "#/definitions/donation-detail/definitions/project"
        },
        "event": {
          "$ref": "#/definitions/donation-detail/definitions/event"
        },
        "donor_ip_address": {
          "$ref": "#/definitions/donation-detail/definitions/donor_ip_address"
        },
        "allow_organisation_contact": {
          "$ref": "#/definitions/donation-detail/definitions/allow_organisation_contact"
        },
        "allow_site_contact": {
          "$ref": "#/definitions/donation-detail/definitions/allow_site_contact"
        },
        "url": {
          "$ref": "#/definitions/donation-detail/definitions/url"
        },
        "donor": {
          "$ref": "#/definitions/person"
        },
        "your_reference": {
          "$ref": "#/definitions/donation-detail/definitions/your_reference"
        },
        "custom_form_values": {
          "$ref": "#/definitions/donation-detail/definitions/custom_form_values"
        },
        "payment": {
          "$ref": "#/definitions/donation-detail/definitions/payment"
        },
        "analytics": {
          "$ref": "#/definitions/donation-detail/definitions/analytics"
        },
        "erp_product_number": {
          "$ref": "#/definitions/project/definitions/erp_product_number"
        },
        "donor_reference": {
          "$ref": "#/definitions/donation-detail/definitions/donor_reference"
        },
        "form_type": {
          "$ref": "#/definitions/donation-detail/definitions/form_type"
        }
      },
      "type": [
        "object"
      ]
    },
    "donation": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Donation",
      "definitions": {
        "amount": {
          "description": "The amount of the donation",
          "type": [
            "object"
          ],
          "properties": {
            "cents": {
              "description": "Numeric amount in cents",
              "example": 12345,
              "type": [
                "integer"
              ]
            },
            "currency": {
              "description": "3 character currency code, as specified in ISO 4217",
              "example": "EUR",
              "pattern": "^([A-Z]{3})$",
              "type": [
                "string"
              ]
            }
          }
        },
        "allow_organisation_contact": {
          "$ref": "#/definitions/common/definitions/allow_organisation_contact"
        },
        "id": {
          "description": "unique identifier of donation",
          "example": "d06a8759-2200-4dcc-b069-7b89ac0ee314",
          "type": [
            "string"
          ]
        },
        "identity": {
          "$ref": "#/definitions/donation/definitions/id"
        },
        "created_at": {
          "description": "when donation was created",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "name": {
          "description": "The name on the donation",
          "example": "Joes Truck Stop",
          "type": [
            "string"
          ]
        },
        "comment": {
          "description": "The comment given with the donation",
          "example": "Wow, what a great idea!",
          "type": [
            "string"
          ]
        },
        "avatar_url": {
          "$ref": "#/definitions/user/definitions/avatar_url"
        },
        "url": {
          "description": "An url where publicly displayable information about the donation can be retrieved.",
          "example": "https://api.betternow.org/donations/542e5f3b-7d8e-475c-8d25-5a2c0742672d",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "private_details_url": {
          "description": "An url where private information about the donation and donor can be retrieved. Requires a secret key.",
          "example": "https://api.betternow.org/donation-details/542e5f3b-7d8e-475c-8d25-5a2c0742672d",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "updated_at": {
          "description": "when donation was updated",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "fundraiser": {
          "$ref": "#/definitions/fundraiser/definitions/fundraiser_summary"
        },
        "recipient": {
          "$ref": "#/definitions/common/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/team/definitions/team_summary"
        },
        "event": {
          "$ref": "#/definitions/event/definitions/event_summary"
        },
        "project": {
          "$ref": "#/definitions/project/definitions/project_summary"
        },
        "donation_summary": {
          "description": "A summarized version of the donation for use in other resources",
          "type": [
            "object"
          ],
          "properties": {
            "amount": {
              "$ref": "#/definitions/donation/definitions/amount"
            },
            "comment": {
              "$ref": "#/definitions/donation/definitions/comment"
            },
            "created_at": {
              "$ref": "#/definitions/donation/definitions/created_at"
            },
            "id": {
              "$ref": "#/definitions/donation/definitions/id"
            },
            "name": {
              "$ref": "#/definitions/donation/definitions/name"
            },
            "updated_at": {
              "$ref": "#/definitions/donation/definitions/updated_at"
            },
            "url": {
              "$ref": "#/definitions/donation/definitions/url"
            },
            "private_details_url": {
              "$ref": "#/definitions/donation/definitions/private_details_url"
            }
          }
        },
        "your_reference": {
          "$ref": "#/definitions/project/definitions/your_reference"
        }
      },
      "description": "The publicly available details about a donation",
      "links": [
        {
          "description": "Info for existing donation.",
          "href": "/donations/{(%23%2Fdefinitions%2Fdonation%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        }
      ],
      "properties": {
        "amount": {
          "$ref": "#/definitions/donation/definitions/amount"
        },
        "comment": {
          "$ref": "#/definitions/donation/definitions/comment"
        },
        "created_at": {
          "$ref": "#/definitions/donation/definitions/created_at"
        },
        "id": {
          "$ref": "#/definitions/donation/definitions/id"
        },
        "private_details_url": {
          "$ref": "#/definitions/donation/definitions/private_details_url"
        },
        "name": {
          "$ref": "#/definitions/donation/definitions/name"
        },
        "updated_at": {
          "$ref": "#/definitions/donation/definitions/updated_at"
        },
        "fundraiser": {
          "$ref": "#/definitions/donation/definitions/recipient"
        },
        "recipient": {
          "$ref": "#/definitions/donation/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/donation/definitions/team"
        },
        "project": {
          "$ref": "#/definitions/donation/definitions/project"
        },
        "event": {
          "$ref": "#/definitions/donation/definitions/event"
        },
        "your_reference": {
          "$ref": "#/definitions/donation/definitions/your_reference"
        }
      },
      "type": [
        "object"
      ]
    },
    "event": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Event",
      "definitions": {
        "id": {
          "description": "unique identifier of event",
          "$ref": "#/definitions/common/definitions/id"
        },
        "identity": {
          "anyOf": [
            {
              "$ref": "#/definitions/event/definitions/id"
            },
            {
              "$ref": "#/definitions/event/definitions/slug"
            }
          ]
        },
        "created_at": {
          "description": "when event was created",
          "$ref": "#/definitions/common/definitions/created_at"
        },
        "updated_at": {
          "description": "when event was updated",
          "$ref": "#/definitions/common/definitions/updated_at"
        },
        "name": {
          "description": "the name of the Event",
          "example": "Copenhagen Marathon 2013",
          "$ref": "#/definitions/common/definitions/name"
        },
        "description": {
          "description": "Text describing the Event added by the event organiser. Contains HTML.",
          "$ref": "#/definitions/common/definitions/description"
        },
        "logo_url": {
          "description": "The logo for the Event",
          "example": "https://cdn.example.net/logo.png",
          "$ref": "#/definitions/common/definitions/logo_url"
        },
        "cover_media": {
          "description": "The image or video to be displayed for this Event. On the BetterNow site, if a video is present it takes precedence.",
          "$ref": "#/definitions/common/definitions/cover_media"
        },
        "start_date": {
          "description": "The date when the Event starts",
          "example": "2012-01-01",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "end_date": {
          "description": "The date when the Event ends. May be blank in the case of a single day event.",
          "example": "2012-01-01",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "location": {
          "description": "Where the event is taking place",
          "type": [
            "object"
          ],
          "properties": {
            "city": {
              "description": "The name of a city",
              "example": "København",
              "type": [
                "string"
              ]
            }
          }
        },
        "url": {
          "example": "https://api.betternow.org/events/1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "html_url": {
          "description": "The url to the Event page on BetterNow",
          "example": "https://dk.betternow.org/events/copenhagen-marathon-2013",
          "$ref": "#/definitions/common/definitions/url"
        },
        "choose_project_to_fundraise_for_url": {
          "description": "The url on BetterNow for people who want to fundraise in connection with an event",
          "example": "https://www.betternow.org/dk/fundraisers/new?event_id=1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "slug": {
          "description": "The current url path component to identify the event. This can, and does, change.",
          "example": "cph-marathon-2013",
          "$ref": "#/definitions/common/definitions/slug"
        },
        "activity_score": {
          "description": "A number that can be used for sorting lists of events. More recently active events should have a higher activity score than events who have raised more money long ago.",
          "example": 987654321,
          "type": [
            "integer"
          ]
        },
        "donations": {
          "description": "Information about the donations made via this Event",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made via this Event",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made via this Event",
              "example": "https://api.betternow.org/events/1234567/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "fundraisers": {
          "description": "Information about the fundraisers for this event",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of active fundraisers",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all fundraisers",
              "example": "https://api.betternow.org/events/1234567/fundraisers",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "event_summary": {
          "description": "A summarized version of the Event for use in other resources",
          "type": [
            "object"
          ],
          "properties": {
            "id": {
              "$ref": "#/definitions/event/definitions/id"
            },
            "name": {
              "$ref": "#/definitions/event/definitions/name"
            },
            "url": {
              "$ref": "#/definitions/event/definitions/url"
            },
            "html_url": {
              "$ref": "#/definitions/event/definitions/html_url"
            }
          }
        }
      },
      "description": "An Event is something that takes place at a particular time and/or place. It could be a sporting event like the Copenhagen Marathon 2013, or a holiday like Christmas 2014",
      "links": [
        {
          "description": "Info for existing event.",
          "href": "/events/{(%23%2Fdefinitions%2Fevent%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List existing events.",
          "href": "/events",
          "method": "GET",
          "rel": "instances",
          "title": "List"
        },
        {
          "description": "List all Projects associated with an Event",
          "href": "/events/{(%23%2Fdefinitions%2Fevent%2Fdefinitions%2Fidentity)}/projects",
          "method": "GET",
          "rel": "project",
          "title": "List Projects",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/project"
            }
          }
        },
        {
          "description": "List all Fundraisers associated with an Event",
          "href": "/events/{(%23%2Fdefinitions%2Fevent%2Fdefinitions%2Fidentity)}/fundraisers",
          "method": "GET",
          "rel": "fundraiser",
          "title": "List Fundraisers",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser"
            }
          }
        },
        {
          "description": "List all Teams associated with an Event",
          "href": "/events/{(%23%2Fdefinitions%2Fevent%2Fdefinitions%2Fidentity)}/teams",
          "method": "GET",
          "rel": "team",
          "title": "List Teams",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/team"
            }
          }
        }
      ],
      "properties": {
        "activity_score": {
          "$ref": "#/definitions/event/definitions/activity_score"
        },
        "choose_project_to_fundraise_for_url": {
          "$ref": "#/definitions/event/definitions/choose_project_to_fundraise_for_url"
        },
        "cover_media": {
          "$ref": "#/definitions/event/definitions/cover_media"
        },
        "created_at": {
          "$ref": "#/definitions/event/definitions/created_at"
        },
        "description": {
          "$ref": "#/definitions/event/definitions/description"
        },
        "donations": {
          "$ref": "#/definitions/event/definitions/donations"
        },
        "end_date": {
          "$ref": "#/definitions/event/definitions/end_date"
        },
        "fundraisers": {
          "$ref": "#/definitions/event/definitions/fundraisers"
        },
        "html_url": {
          "$ref": "#/definitions/event/definitions/html_url"
        },
        "id": {
          "$ref": "#/definitions/event/definitions/id"
        },
        "location": {
          "$ref": "#/definitions/event/definitions/location"
        },
        "name": {
          "$ref": "#/definitions/event/definitions/name"
        },
        "logo_url": {
          "$ref": "#/definitions/event/definitions/logo_url"
        },
        "updated_at": {
          "$ref": "#/definitions/event/definitions/updated_at"
        },
        "slug": {
          "$ref": "#/definitions/event/definitions/slug"
        },
        "start_date": {
          "$ref": "#/definitions/event/definitions/start_date"
        },
        "url": {
          "$ref": "#/definitions/event/definitions/url"
        }
      },
      "type": [
        "object"
      ]
    },
    "fundraiser": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Fundraising Page",
      "definitions": {
        "activity_score": {
          "description": "A number that can be used for sorting lists of fundraisers. More recently active fundraisers should have a higher activity score than fundraisers who have raised more money long ago.",
          "example": 987654321,
          "type": [
            "integer"
          ]
        },
        "allow_organisation_contact": {
          "$ref": "#/definitions/common/definitions/allow_organisation_contact"
        },
        "created_at": {
          "$ref": "#/definitions/common/definitions/created_at"
        },
        "description": {
          "description": "The text written by the fundraiser owner. Contains HTML.",
          "$ref": "#/definitions/common/definitions/description"
        },
        "fundraiser_type": {
          "description": "The type of the fundraiser on BetterNow",
          "example": "birthday",
          "type": [
            "string"
          ],
          "enum": [
            "birthday",
            "anniversary",
            "in_memory_of",
            "sports_event",
            "corporate",
            "cultural_event",
            "sponsorable",
            "tribute_fund",
            "live_stream",
            "crowdfunding",
            "door_to_door",
            "personal",
            "other"
          ]
        },
        "donate_url": {
          "description": "The current url to donate via the fundraising page on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://www.betternow.org/dk/fundraisers/firstname-lastnames-fundraiser/donations/new",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "donations": {
          "description": "Information about the donations to this fundraiser",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made to this fundraiser",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made to this fundraiser",
              "example": "https://api.betternow.org/fundraisers/1234567/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "end_date": {
          "description": "The end date for a fundraiser.",
          "example": "2012-01-01",
          "format": "date",
          "type": [
            "string"
          ]
        },
        "goal": {
          "description": "The monetary goal for this fundraiser",
          "$ref": "#/definitions/common/definitions/amount"
        },
        "state": {
          "description": "The state of this fundraiser. Fundraisers in the draft and trashed states are not available via the API.",
          "example": "published",
          "type": [
            "string"
          ],
          "enum": [
            "draft",
            "finished",
            "finished_hidden",
            "hidden",
            "published",
            "trashed"
          ]
        },
        "headline": {
          "description": "The headline for this fundraising page",
          "example": "Firstname Lastname's Fundraiser for HelpNow",
          "$ref": "#/definitions/common/definitions/headline"
        },
        "html_url": {
          "description": "The current url to view the fundraising page on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://dk.betternow.org/fundraisers/firstname-lastnames-fundraiser-for-helpnow",
          "$ref": "#/definitions/common/definitions/html_url"
        },
        "id": {
          "description": "The unique identifier of the fundraising page",
          "$ref": "#/definitions/common/definitions/id"
        },
        "identity": {
          "anyOf": [
            {
              "$ref": "#/definitions/fundraiser/definitions/id"
            },
            {
              "$ref": "#/definitions/fundraiser/definitions/slug"
            }
          ]
        },
        "recipient": {
          "$ref": "#/definitions/common/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/team/definitions/team_summary"
        },
        "event": {
          "$ref": "#/definitions/event/definitions/event_summary"
        },
        "project": {
          "$ref": "#/definitions/project/definitions/project_summary"
        },
        "slug": {
          "description": "The current url path component to identify the fundraiser. This can, and does, change.",
          "example": "firstname-lastnames-fundraiser-for-helpnow",
          "$ref": "#/definitions/common/definitions/slug"
        },
        "updated_at": {
          "$ref": "#/definitions/common/definitions/updated_at"
        },
        "url": {
          "example": "https://api.betternow.org/fundraisers/1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "owner": {
          "description": "The user who owns this fundraiser",
          "$ref": "#/definitions/user/definitions/user_summary"
        },
        "cover_media": {
          "$ref": "#/definitions/common/definitions/cover_media"
        },
        "override_image_url": {
          "description": "The url of an image to be shown in place of the owner's avatar.",
          "example": "https://example.com/image.jpg",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "birth_date": {
          "description": "The day the person who a tribute_fund fundraiser is honoring was born.",
          "example": "2012-01-01",
          "format": "date",
          "type": [
            "string"
          ]
        },
        "death_date": {
          "description": "The day the person who a tribute_fund fundraiser is honoring died.",
          "example": "2012-01-01",
          "format": "date",
          "type": [
            "string"
          ]
        },
        "funeral_date": {
          "description": "The date of the funeral for the person who a tribute_fund fundraiser is honoring.",
          "example": "2012-01-01",
          "format": "date",
          "type": [
            "string"
          ]
        },
        "honoree": {
          "description": "The name of the person who a tribute_fund fundraiser is honoring",
          "example": "Dorthe Jensen Hansen",
          "type": [
            "string"
          ]
        },
        "fundraiser_summary": {
          "description": "A summarized version of the Fundraiser for use in other resources",
          "type": [
            "object"
          ],
          "properties": {
            "id": {
              "$ref": "#/definitions/fundraiser/definitions/id"
            },
            "headline": {
              "$ref": "#/definitions/fundraiser/definitions/headline"
            },
            "url": {
              "$ref": "#/definitions/fundraiser/definitions/url"
            },
            "html_url": {
              "$ref": "#/definitions/fundraiser/definitions/html_url"
            }
          }
        },
        "partner_data": {
          "$ref": "#/definitions/common/definitions/partner_data"
        },
        "your_reference": {
          "$ref": "#/definitions/project/definitions/your_reference"
        },
        "company": {
          "description": "Information about the company that owns the fundraiser. This will only include information if Enhanced Corporate Fundraisers are activated. Contact support@betternow.org to learn more about Enhanced Corporate Fundraisers.",
          "type": [
            "object"
          ],
          "properties": {
            "registered_name": {
              "description": "The name of the company from the company registry",
              "example": "BETTERNOW WORLDWIDE ApS",
              "type": [
                "string"
              ]
            },
            "registration_id": {
              "description": "The ID of the compay from the registry (CVR/Orgnummer/etc.)",
              "example": 34205566,
              "type": [
                "string"
              ]
            },
            "registration_country_code": {
              "description": "The country code for the country where the company is registered",
              "example": "DK",
              "type": [
                "string"
              ]
            },
            "updated_from_registry_at": {
              "description": "When the system last pulled information about the company from the registry",
              "example": "2024-11-15T15:27:27+01:00",
              "format": "date",
              "type": [
                "string"
              ]
            },
            "sector_code": {
              "description": "The sector code for the company",
              "example": 620100,
              "type": [
                "string"
              ]
            },
            "sector_description": {
              "description": "A description of the sector code",
              "example": "Computerprogrammering",
              "type": [
                "string"
              ]
            },
            "employee_count": {
              "description": "The number of employees at the company",
              "example": 2,
              "type": [
                "integer"
              ]
            },
            "address": {
              "description": "The address of the company. If the registry supports both a business address and a postal address, this will be the postal address.",
              "type": [
                "object"
              ],
              "properties": {
                "street_line_1": {
                  "example": null,
                  "type": [
                    "string"
                  ]
                },
                "city": {
                  "example": "Frederiksberg",
                  "type": [
                    "string"
                  ]
                },
                "postal_code": {
                  "example": 2000,
                  "type": [
                    "string"
                  ]
                },
                "province": {
                  "example": null,
                  "type": [
                    "string"
                  ]
                },
                "country": {
                  "example": "DK",
                  "type": [
                    "string"
                  ]
                }
              }
            }
          }
        },
        "qr_urls": {
          "description": "URLs to QR codes for the fundraiser and donation forms",
          "type": [
            "object"
          ],
          "properties": {
            "fundraiser_qr_url": {
              "description": "A QR code in PNG format for the fundraiser page. Only provided if the fundraiser can receive donations.",
              "example": "https://example.org/qr.png",
              "format": "uri",
              "type": [
                "string"
              ]
            },
            "mobile_donation_qr_url": {
              "description": "A QR code in PNG format for the mobile donation form. For fundraisers with a Mobilepay Myshop number it is a Myshop url, for fundraisers using vipps epayment it is a Vipps url, otherwise it is our short mobile donation form. Only provided if the fundraiser can receive donations.",
              "example": "https://example.org/qr.png",
              "format": "uri",
              "type": [
                "string"
              ]
            },
            "standard_donation_qr_url": {
              "description": "A QR code in PNG format for the standard donation form. Only provided if the fundraiser can receive donations.",
              "example": "https://example.org/qr.png",
              "format": "uri",
              "type": [
                "string"
              ]
            }
          }
        }
      },
      "description": "Detailed information about a single Fundraising Page on BetterNow.org",
      "links": [
        {
          "description": "Info for existing fundraiser.",
          "href": "/fundraisers/{(%23%2Fdefinitions%2Ffundraiser%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List existing fundraisers.",
          "href": "/fundraisers",
          "method": "GET",
          "rel": "instances",
          "title": "List"
        },
        {
          "description": "Create a fundraiser. Requires a secret key.",
          "href": "/fundraisers",
          "method": "POST",
          "rel": "fundraiser",
          "title": "Create",
          "schema": {
            "properties": {
              "name": {
                "$ref": "#/definitions/fundraiser/definitions/headline"
              },
              "email": {
                "$ref": "#/definitions/person/definitions/email"
              },
              "description": {
                "$ref": "#/definitions/fundraiser/definitions/description"
              },
              "goal": {
                "$ref": "#/definitions/fundraiser/definitions/goal"
              },
              "end_date": {
                "$ref": "#/definitions/fundraiser/definitions/end_date"
              },
              "team_id": {
                "$ref": "#/definitions/team/definitions/id"
              },
              "event_id": {
                "$ref": "#/definitions/event/definitions/id"
              },
              "fundraiser_type": {
                "$ref": "#/definitions/fundraiser/definitions/fundraiser_type"
              },
              "first_name": {
                "$ref": "#/definitions/person/definitions/first_name"
              },
              "middle_name": {
                "$ref": "#/definitions/person/definitions/middle_name"
              },
              "last_name": {
                "$ref": "#/definitions/person/definitions/last_name"
              },
              "phone": {
                "$ref": "#/definitions/person/definitions/phone"
              },
              "site_id": {
                "$ref": "#/definitions/site/definitions/id"
              },
              "project_id": {
                "$ref": "#/definitions/project/definitions/id"
              },
              "avatar_url": {
                "$ref": "#/definitions/fundraiser/definitions/override_image_url"
              },
              "honoree": {
                "$ref": "#/definitions/fundraiser/definitions/honoree"
              },
              "birth_date": {
                "$ref": "#/definitions/fundraiser/definitions/birth_date"
              },
              "death_date": {
                "$ref": "#/definitions/fundraiser/definitions/death_date"
              },
              "funeral_date": {
                "$ref": "#/definitions/fundraiser/definitions/funeral_date"
              }
            },
            "required": [
              "name",
              "project_id",
              "site_id",
              "email",
              "first_name",
              "last_name"
            ]
          }
        },
        {
          "description": "List the donations for existing fundraiser. Donations will always be returned in reverse-chronological order (newest first).",
          "href": "/fundraisers/{(%23%2Fdefinitions%2Ffundraiser%2Fdefinitions%2Fidentity)}/donations",
          "method": "GET",
          "rel": "donation",
          "title": "List Donations",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/donation/definitions/donation_summary"
            }
          }
        },
        {
          "description": "List the updates for existing fundraiser.",
          "href": "/fundraisers/{(%23%2Fdefinitions%2Ffundraiser%2Fdefinitions%2Fidentity)}/updates",
          "method": "GET",
          "rel": "fundraiser_update",
          "title": "List Fundraiser Updates",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser_update"
            }
          }
        }
      ],
      "properties": {
        "activity_score": {
          "$ref": "#/definitions/fundraiser/definitions/activity_score"
        },
        "allow_organisation_contact": {
          "$ref": "#/definitions/fundraiser/definitions/allow_organisation_contact"
        },
        "cover_media": {
          "$ref": "#/definitions/fundraiser/definitions/cover_media"
        },
        "created_at": {
          "$ref": "#/definitions/fundraiser/definitions/created_at"
        },
        "description": {
          "$ref": "#/definitions/fundraiser/definitions/description"
        },
        "state": {
          "$ref": "#/definitions/fundraiser/definitions/state"
        },
        "fundraiser_type": {
          "$ref": "#/definitions/fundraiser/definitions/fundraiser_type"
        },
        "donate_url": {
          "$ref": "#/definitions/fundraiser/definitions/donate_url"
        },
        "donations": {
          "$ref": "#/definitions/fundraiser/definitions/donations"
        },
        "end_date": {
          "$ref": "#/definitions/fundraiser/definitions/end_date"
        },
        "goal": {
          "$ref": "#/definitions/fundraiser/definitions/goal"
        },
        "headline": {
          "$ref": "#/definitions/fundraiser/definitions/headline"
        },
        "html_url": {
          "$ref": "#/definitions/fundraiser/definitions/html_url"
        },
        "id": {
          "$ref": "#/definitions/fundraiser/definitions/id"
        },
        "owner": {
          "$ref": "#/definitions/fundraiser/definitions/owner"
        },
        "partner_data": {
          "$ref": "#/definitions/fundraiser/definitions/partner_data"
        },
        "recipient": {
          "$ref": "#/definitions/fundraiser/definitions/recipient"
        },
        "team": {
          "$ref": "#/definitions/team/definitions/team_summary"
        },
        "project": {
          "$ref": "#/definitions/project/definitions/project_summary"
        },
        "event": {
          "$ref": "#/definitions/event/definitions/event_summary"
        },
        "slug": {
          "$ref": "#/definitions/fundraiser/definitions/slug"
        },
        "updated_at": {
          "$ref": "#/definitions/fundraiser/definitions/updated_at"
        },
        "url": {
          "$ref": "#/definitions/fundraiser/definitions/url"
        },
        "your_reference": {
          "$ref": "#/definitions/fundraiser/definitions/your_reference"
        },
        "honoree": {
          "$ref": "#/definitions/fundraiser/definitions/honoree"
        },
        "birth_date": {
          "$ref": "#/definitions/fundraiser/definitions/birth_date"
        },
        "death_date": {
          "$ref": "#/definitions/fundraiser/definitions/death_date"
        },
        "funeral_date": {
          "$ref": "#/definitions/fundraiser/definitions/funeral_date"
        },
        "company": {
          "$ref": "#/definitions/fundraiser/definitions/company"
        },
        "qr_urls": {
          "$ref": "#/definitions/fundraiser/definitions/qr_urls"
        }
      },
      "type": [
        "object"
      ]
    },
    "fundraiser_update": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Fundraiser Update",
      "definitions": {
        "created_at": {
          "description": "when update was created",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "title": {
          "description": "The title of the update",
          "example": "Great job everyone!",
          "type": [
            "string"
          ]
        },
        "body": {
          "description": "The body of the update, can contain HTML",
          "example": "<p>Thanks for all your support - you <strong>rock!</strong>",
          "type": [
            "string"
          ]
        },
        "avatar_url": {
          "$ref": "#/definitions/user/definitions/avatar_url"
        },
        "updated_at": {
          "description": "when update was updated",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "owner": {
          "description": "The user who posted this update (usually fundraiser owner)",
          "$ref": "#/definitions/user/definitions/user_summary"
        },
        "cover_media": {
          "$ref": "#/definitions/common/definitions/cover_media"
        }
      },
      "description": "An update that was sent to all donors to this fundraiser and posted on the fundraiser page",
      "properties": {
        "body": {
          "$ref": "#/definitions/fundraiser_update/definitions/body"
        },
        "cover_media": {
          "$ref": "#/definitions/fundraiser_update/definitions/cover_media"
        },
        "created_at": {
          "$ref": "#/definitions/fundraiser_update/definitions/created_at"
        },
        "owner": {
          "$ref": "#/definitions/fundraiser_update/definitions/owner"
        },
        "title": {
          "$ref": "#/definitions/fundraiser_update/definitions/title"
        },
        "updated_at": {
          "$ref": "#/definitions/fundraiser_update/definitions/updated_at"
        }
      },
      "type": [
        "object"
      ]
    },
    "organisation": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Organisation",
      "definitions": {
        "id": {
          "description": "Unique identifier of organisation",
          "$ref": "#/definitions/common/definitions/id"
        },
        "identity": {
          "anyOf": [
            {
              "$ref": "#/definitions/organisation/definitions/id"
            },
            {
              "$ref": "#/definitions/organisation/definitions/slug"
            }
          ]
        },
        "created_at": {
          "description": "When organisation was created",
          "$ref": "#/definitions/common/definitions/created_at"
        },
        "updated_at": {
          "description": "When organisation was updated",
          "$ref": "#/definitions/common/definitions/updated_at"
        },
        "name": {
          "description": "The name of the Organisation",
          "example": "HelpNow",
          "$ref": "#/definitions/common/definitions/name"
        },
        "html_url": {
          "description": "The current url to view the organisation page on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://dk.betternow.org/charities/helpnow",
          "$ref": "#/definitions/common/definitions/html_url"
        },
        "url": {
          "example": "https://api.betternow.org/organisations/1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "description": {
          "description": "The text written by the Organisation's administrators. Contains HTML",
          "example": "HelpNow is a dummy organisation created by BetterNow - to help us doing tutorial videos and screenshots. It is not a real organisation, and you cannot donate here.<br><br><br>",
          "$ref": "#/definitions/common/definitions/description"
        },
        "projects": {
          "description": "Information about this organisation's projects",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of the organisation's active projects",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "example": "https://api.betternow.org/organisations/1234567/projects",
              "description": "The url to retrieve details about this organisation's projects",
              "$ref": "#/definitions/project/definitions/url"
            }
          }
        },
        "donate_url": {
          "description": "The current url to donate directly to the organisation on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://www.betternow.org/dk/fundraisers/helpnow-indsamling1/donations/new",
          "$ref": "#/definitions/project/definitions/url"
        },
        "new_fundraiser_url": {
          "description": "The current url to create a new Fundraiser for this organisation on BetterNow. This can, and does, change. Requests to old urls will redirect to the current url.",
          "example": "https://www.betternow.org/dk/projects/helpnow-projekt/fundraisers/new",
          "$ref": "#/definitions/project/definitions/url"
        },
        "donations": {
          "description": "Information about the donations to this organisation",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made to this project",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made to this organisation",
              "example": "https://api.betternow.org/organisations/1234567/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "fundraisers": {
          "description": "Information about the fundraisers for this organisation",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of active fundraisers",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all fundraisers",
              "example": "https://api.betternow.org/organisations/1234567/fundraisers",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "logo_url": {
          "description": "The logo for the Organisation. 92x92 pixels.",
          "example": "https://cdn.example.net/logo.png",
          "$ref": "#/definitions/common/definitions/logo_url"
        },
        "cover_media": {
          "description": "The image or video to be displayed for this Organisation. On the BetterNow site, if a video is present it takes precedence.",
          "$ref": "#/definitions/common/definitions/cover_media"
        },
        "slug": {
          "description": "The current url path component to identify the organisation. This can, and does, change.",
          "example": "msf",
          "$ref": "#/definitions/common/definitions/slug"
        }
      },
      "description": "An Organisation can receive Donations on BetterNow",
      "links": [
        {
          "description": "Info for existing organisation.",
          "href": "/organisations/{(%23%2Fdefinitions%2Forganisation%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List all Projects for an existing Organisation. Projects will be ordered by activity score, descending.",
          "href": "/organisations/{(%23%2Fdefinitions%2Forganisation%2Fdefinitions%2Fidentity)}/projects",
          "method": "GET",
          "rel": "project",
          "title": "List Projects",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/project"
            }
          }
        },
        {
          "description": "List all Fundraisers for an existing Organisation. Fundraisers will be ordered by activity score, descending.",
          "href": "/organisations/{(%23%2Fdefinitions%2Forganisation%2Fdefinitions%2Fidentity)}/fundraisers",
          "method": "GET",
          "rel": "fundraiser",
          "title": "List Fundraisers",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser"
            }
          }
        },
        {
          "description": "List the donations for an existing Organisation. Donations will always be returned in reverse-chronological order (newest first).",
          "href": "/organisations/{(%23%2Fdefinitions%2Forganisation%2Fdefinitions%2Fidentity)}/donations",
          "method": "GET",
          "rel": "donation",
          "title": "List Donations",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/donation"
            }
          }
        }
      ],
      "properties": {
        "cover_media": {
          "$ref": "#/definitions/organisation/definitions/cover_media"
        },
        "created_at": {
          "$ref": "#/definitions/organisation/definitions/created_at"
        },
        "description": {
          "$ref": "#/definitions/organisation/definitions/description"
        },
        "donations": {
          "$ref": "#/definitions/organisation/definitions/donations"
        },
        "donate_url": {
          "$ref": "#/definitions/organisation/definitions/donate_url"
        },
        "fundraisers": {
          "$ref": "#/definitions/organisation/definitions/fundraisers"
        },
        "html_url": {
          "$ref": "#/definitions/organisation/definitions/html_url"
        },
        "id": {
          "$ref": "#/definitions/organisation/definitions/id"
        },
        "logo_url": {
          "$ref": "#/definitions/organisation/definitions/logo_url"
        },
        "name": {
          "$ref": "#/definitions/organisation/definitions/name"
        },
        "new_fundraiser_url": {
          "$ref": "#/definitions/organisation/definitions/new_fundraiser_url"
        },
        "projects": {
          "$ref": "#/definitions/organisation/definitions/projects"
        },
        "updated_at": {
          "$ref": "#/definitions/organisation/definitions/updated_at"
        },
        "url": {
          "$ref": "#/definitions/organisation/definitions/url"
        }
      },
      "type": [
        "object"
      ]
    },
    "person": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Person",
      "definitions": {
        "id": {
          "description": "unique identifier of person",
          "example": "fdb6cd2a-3ca7-40db-8fae-135daebecdab",
          "type": [
            "string"
          ]
        },
        "identity": {
          "$ref": "#/definitions/person/definitions/id"
        },
        "first_name": {
          "$ref": "#/definitions/user/definitions/first_name"
        },
        "middle_name": {
          "$ref": "#/definitions/user/definitions/middle_name"
        },
        "last_name": {
          "$ref": "#/definitions/user/definitions/last_name"
        },
        "email": {
          "example": "user@example.com",
          "type": [
            "string"
          ]
        },
        "phone": {
          "description": "Phone number in E.164 format",
          "example": "+4510101010",
          "type": [
            "string"
          ]
        },
        "title": {
          "example": "Director of Personal Fundraising",
          "type": [
            "string"
          ]
        },
        "created_at": {
          "$ref": "#/definitions/user/definitions/created_at"
        },
        "birth_month": {
          "example": 1,
          "type": [
            "integer"
          ],
          "minimum": 1,
          "maximum": 12
        },
        "birth_day": {
          "example": 1,
          "type": [
            "integer"
          ],
          "minimum": 1,
          "maximum": 31
        },
        "locale": {
          "description": "ISO 639-1 locale code",
          "example": "en",
          "type": [
            "string"
          ]
        },
        "allow_site_contact": {
          "description": "true if the user has agreed to be contacted by the site they either donated via or signed up on.",
          "type": [
            "boolean"
          ]
        },
        "partner_reference": {
          "description": "This is an external identifier that is intended to be used in linking partner systems to BetterNow. The partner reference can be supplied when creating a user.",
          "type": [
            "string"
          ]
        },
        "url": {
          "$ref": "#/definitions/user/definitions/private_person_url"
        },
        "donations": {
          "description": "Information about the donations made by this person",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made by this person",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made by this person",
              "example": "https://api.betternow.org/people/fdb6cd2a-3ca7-40db-8fae-135daebecdab/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "fundraisers": {
          "description": "Information about the fundraiser pages owned by this person",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of active fundraisers",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all fundraisers",
              "example": "https://api.betternow.org/people/fdb6cd2a-3ca7-40db-8fae-135daebecdab/fundraisers",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "teams": {
          "description": "Information about the teams this person is a member of",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of teams",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all teams",
              "example": "https://api.betternow.org/people/fdb6cd2a-3ca7-40db-8fae-135daebecdab/teams",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        }
      },
      "description": "Private (personally identifiable) information about a BetterNow user (donor, fundraiser owner, team captain, etc.) Requires a secret key.",
      "links": [
        {
          "description": "Info for existing person.",
          "href": "/people/{(%23%2Fdefinitions%2Fperson%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List this person's donations. Donations will always be returned in reverse-chronological order (newest first).",
          "href": "/people/{(%23%2Fdefinitions%2Fperson%2Fdefinitions%2Fidentity)}/donations",
          "method": "GET",
          "rel": "donation",
          "title": "List Donations",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/donation"
            }
          }
        },
        {
          "description": "List all of this persons Fundraising Pages. Fundraisers will be ordered by activity score, descending.",
          "href": "/people/{(%23%2Fdefinitions%2Fperson%2Fdefinitions%2Fidentity)}/fundraisers",
          "method": "GET",
          "rel": "fundraiser",
          "title": "List Fundraisers",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser"
            }
          }
        },
        {
          "description": "List all Teams this person is a member of",
          "href": "/people/{(%23%2Fdefinitions%2Fperson%2Fdefinitions%2Fidentity)}/teams",
          "method": "GET",
          "rel": "team",
          "title": "List Teams",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/team"
            }
          }
        }
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/person/definitions/id"
        },
        "first_name": {
          "$ref": "#/definitions/person/definitions/first_name"
        },
        "middle_name": {
          "$ref": "#/definitions/person/definitions/middle_name"
        },
        "last_name": {
          "$ref": "#/definitions/person/definitions/last_name"
        },
        "email": {
          "$ref": "#/definitions/person/definitions/email"
        },
        "phone": {
          "$ref": "#/definitions/person/definitions/phone"
        },
        "title": {
          "$ref": "#/definitions/person/definitions/title"
        },
        "created_at": {
          "$ref": "#/definitions/person/definitions/created_at"
        },
        "birth_month": {
          "$ref": "#/definitions/person/definitions/birth_month"
        },
        "birth_day": {
          "$ref": "#/definitions/person/definitions/birth_day"
        },
        "locale": {
          "$ref": "#/definitions/person/definitions/locale"
        },
        "allow_site_contact": {
          "$ref": "#/definitions/person/definitions/allow_site_contact"
        },
        "partner_reference": {
          "$ref": "#/definitions/person/definitions/partner_reference"
        },
        "url": {
          "$ref": "#/definitions/person/definitions/url"
        },
        "donations": {
          "$ref": "#/definitions/person/definitions/donations"
        },
        "fundraisers": {
          "$ref": "#/definitions/person/definitions/fundraisers"
        },
        "teams": {
          "$ref": "#/definitions/person/definitions/teams"
        }
      },
      "type": [
        "object"
      ]
    },
    "project": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Project",
      "definitions": {
        "activity_score": {
          "description": "A number that can be used for sorting lists of projects. More recently active projects should have a higher activity score than projects who have raised more money long ago.",
          "example": 987654321,
          "type": [
            "integer"
          ]
        },
        "id": {
          "description": "Unique identifier of project",
          "$ref": "#/definitions/common/definitions/id"
        },
        "identity": {
          "anyOf": [
            {
              "$ref": "#/definitions/project/definitions/id"
            },
            {
              "$ref": "#/definitions/project/definitions/slug"
            }
          ]
        },
        "created_at": {
          "description": "When project was created",
          "$ref": "#/definitions/common/definitions/created_at"
        },
        "updated_at": {
          "description": "When project was updated",
          "$ref": "#/definitions/common/definitions/updated_at"
        },
        "name": {
          "description": "The name of the Project",
          "example": "HelpNows generelle arbejde",
          "$ref": "#/definitions/common/definitions/name"
        },
        "description": {
          "description": "The text written by the Project's administrators. Contains HTML",
          "example": "We need your money for this <b>GREAT</b> project",
          "$ref": "#/definitions/common/definitions/description"
        },
        "url": {
          "example": "https://api.betternow.org/projects/1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "state": {
          "description": "The state of this project",
          "$ref": "#/definitions/common/definitions/state"
        },
        "html_url": {
          "description": "The current url to view the project page on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://dk.betternow.org/projects/helpnow-projekt",
          "$ref": "#/definitions/common/definitions/html_url"
        },
        "fundraisers": {
          "description": "Information about the fundraisers for this project",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of active fundraisers",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all fundraisers",
              "example": "https://api.betternow.org/projects/1234567/fundraisers",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "project_summary": {
          "description": "A summarized version of the Project for use in other resources",
          "type": [
            "object"
          ],
          "properties": {
            "id": {
              "$ref": "#/definitions/project/definitions/id"
            },
            "name": {
              "$ref": "#/definitions/project/definitions/name"
            },
            "url": {
              "$ref": "#/definitions/project/definitions/url"
            },
            "html_url": {
              "$ref": "#/definitions/project/definitions/html_url"
            }
          }
        },
        "donate_url": {
          "description": "The current url to donate directly to the project on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url.",
          "example": "https://www.betternow.org/dk/fundraisers/helpnow-indsamling21/donations/new",
          "$ref": "#/definitions/project/definitions/url"
        },
        "new_fundraiser_url": {
          "description": "The current url to create a new Fundraiser for this project on BetterNow. This can, and does, change. Requests to old urls will redirect to the current url.",
          "example": "https://www.betternow.org/dk/projects/helpnow-projekt/fundraisers/new",
          "$ref": "#/definitions/project/definitions/url"
        },
        "donations": {
          "description": "Information about the donations to this project",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made to this project",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made to this project",
              "example": "https://api.betternow.org/projects/1234567/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "slug": {
          "description": "The current url path component to identify the project. This can, and does, change.",
          "example": "helpnow-project",
          "$ref": "#/definitions/common/definitions/slug"
        },
        "cover_media": {
          "$ref": "#/definitions/common/definitions/cover_media"
        },
        "recipient": {
          "$ref": "#/definitions/common/definitions/recipient"
        },
        "your_reference": {
          "description": "A string that you can use to identify the project and its fundraisers and donations. The value will be inherited by any fundraisers created for the project and any donations made via the fundraisers. Commonly used to assign donations to e.g. a campaign in your CRM system. You can set this value in the dashboard for your project.",
          "example": "my-crm-project-reference-123456",
          "type": [
            "string"
          ]
        },
        "erp_product_number": {
          "description": "A string that you can use to identify the product number to use for a donation in an integrated ERP system. If your ERP system is not integrated with BetterNow this will be null.",
          "example": "4000",
          "type": [
            "string"
          ]
        }
      },
      "description": "A Project is a specific cause that Users can Fundraise for. An Organisation typically has several Projects",
      "links": [
        {
          "description": "Info for existing project.",
          "href": "/projects/{(%23%2Fdefinitions%2Fproject%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List all Fundraisers for an existing Project. Fundraisers will be ordered by activity score, descending.",
          "href": "/projects/{(%23%2Fdefinitions%2Fproject%2Fdefinitions%2Fidentity)}/fundraisers",
          "method": "GET",
          "rel": "fundraiser",
          "title": "List Fundraisers",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser"
            }
          }
        },
        {
          "description": "List the donations for existing project. Donations will always be returned in reverse-chronological order (newest first).",
          "href": "/projects/{(%23%2Fdefinitions%2Fproject%2Fdefinitions%2Fidentity)}/donations",
          "method": "GET",
          "rel": "donation",
          "title": "List Donations",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/donation"
            }
          }
        }
      ],
      "properties": {
        "activity_score": {
          "$ref": "#/definitions/project/definitions/activity_score"
        },
        "cover_media": {
          "$ref": "#/definitions/project/definitions/cover_media"
        },
        "created_at": {
          "$ref": "#/definitions/project/definitions/created_at"
        },
        "description": {
          "$ref": "#/definitions/project/definitions/description"
        },
        "donations": {
          "$ref": "#/definitions/project/definitions/donations"
        },
        "donate_url": {
          "$ref": "#/definitions/project/definitions/donate_url"
        },
        "html_url": {
          "$ref": "#/definitions/project/definitions/html_url"
        },
        "id": {
          "$ref": "#/definitions/project/definitions/id"
        },
        "fundraisers": {
          "$ref": "#/definitions/project/definitions/fundraisers"
        },
        "name": {
          "$ref": "#/definitions/project/definitions/name"
        },
        "new_fundraiser_url": {
          "$ref": "#/definitions/project/definitions/new_fundraiser_url"
        },
        "updated_at": {
          "$ref": "#/definitions/project/definitions/updated_at"
        },
        "url": {
          "$ref": "#/definitions/project/definitions/url"
        },
        "recipient": {
          "$ref": "#/definitions/project/definitions/recipient"
        },
        "slug": {
          "$ref": "#/definitions/project/definitions/slug"
        },
        "state": {
          "$ref": "#/definitions/project/definitions/state"
        },
        "your_reference": {
          "$ref": "#/definitions/project/definitions/your_reference"
        },
        "erp_product_number": {
          "$ref": "#/definitions/project/definitions/erp_product_number"
        }
      },
      "type": [
        "object"
      ]
    },
    "site": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Site",
      "definitions": {
        "id": {
          "description": "unique identifier of site",
          "example": 1234567,
          "type": [
            "integer"
          ]
        },
        "identity": {
          "$ref": "#/definitions/site/definitions/id"
        },
        "created_at": {
          "description": "when site was created",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "updated_at": {
          "description": "when site was updated",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "cname": {
          "description": "The CNAME dns record.",
          "example": "fundraising.betternow.org",
          "type": [
            "string"
          ]
        },
        "subdomain": {
          "description": "The unique subdomain for this site.",
          "example": "sample-event",
          "type": [
            "string"
          ]
        },
        "hostname": {
          "description": "The hostname for this site.",
          "example": "sample-event.eventsite.org",
          "type": [
            "string"
          ]
        }
      },
      "description": "A website running the BetterNow software.",
      "links": [
        {
          "description": "List existing sites",
          "href": "/sites",
          "method": "GET",
          "rel": "instances",
          "title": "List"
        }
      ],
      "properties": {
        "cname": {
          "$ref": "#/definitions/site/definitions/cname"
        },
        "created_at": {
          "$ref": "#/definitions/site/definitions/created_at"
        },
        "id": {
          "$ref": "#/definitions/site/definitions/id"
        },
        "hostname": {
          "$ref": "#/definitions/site/definitions/hostname"
        },
        "subdomain": {
          "$ref": "#/definitions/site/definitions/subdomain"
        },
        "updated_at": {
          "$ref": "#/definitions/site/definitions/updated_at"
        }
      },
      "type": [
        "object"
      ]
    },
    "team": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Team",
      "definitions": {
        "id": {
          "description": "unique identifier of team",
          "$ref": "#/definitions/common/definitions/id"
        },
        "identity": {
          "anyOf": [
            {
              "$ref": "#/definitions/team/definitions/id"
            },
            {
              "$ref": "#/definitions/team/definitions/slug"
            }
          ]
        },
        "created_at": {
          "description": "when team was created",
          "$ref": "#/definitions/common/definitions/created_at"
        },
        "updated_at": {
          "description": "when team was updated",
          "$ref": "#/definitions/common/definitions/updated_at"
        },
        "logo_url": {
          "description": "The logo for the team. 92x92 pixels.",
          "example": "https://cdn.example.net/logo.png",
          "$ref": "#/definitions/common/definitions/logo_url"
        },
        "url": {
          "example": "https://api.betternow.org/team/1234567",
          "$ref": "#/definitions/common/definitions/url"
        },
        "state": {
          "description": "The state of this team",
          "$ref": "#/definitions/common/definitions/state"
        },
        "html_url": {
          "description": "The url to the Team page on BetterNow",
          "example": "https://dk.betternow.org/teams/team-novo",
          "$ref": "#/definitions/common/definitions/url"
        },
        "cover_media": {
          "description": "The image or video to be displayed for this Team. On the BetterNow site, if a video is present it takes precedence.",
          "$ref": "#/definitions/common/definitions/cover_media"
        },
        "name": {
          "description": "the name of the Team",
          "example": "Team NOVO",
          "$ref": "#/definitions/common/definitions/name"
        },
        "description": {
          "description": "Text describing the Team added by the Team Captain. Contains HTML.",
          "$ref": "#/definitions/common/definitions/description"
        },
        "donations": {
          "description": "Information about the donations to fundraisers that are members of this team",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The count of all donations made",
              "example": 123,
              "type": [
                "integer"
              ]
            },
            "total_donated": {
              "description": "The monetary total of all donations",
              "$ref": "#/definitions/common/definitions/amount"
            },
            "url": {
              "description": "The url to retrieve details on all donations made via team members",
              "example": "https://api.betternow.org/teams/1234567/donations",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "captain": {
          "description": "The user who is the captain of this Team",
          "$ref": "#/definitions/user/definitions/user_summary"
        },
        "slug": {
          "description": "The current url path component to identify the team. This can, and does, change.",
          "example": "team-novo",
          "$ref": "#/definitions/common/definitions/slug"
        },
        "fundraisers": {
          "description": "Information about the fundraisers that are members of this team",
          "type": [
            "object"
          ],
          "properties": {
            "count": {
              "description": "The number of active fundraisers",
              "example": 12,
              "type": [
                "integer"
              ]
            },
            "url": {
              "description": "The url to retrieve all fundraisers",
              "example": "https://api.betternow.org/teams/1234567/fundraisers",
              "$ref": "#/definitions/common/definitions/url"
            }
          }
        },
        "team_summary": {
          "description": "A summarized version of the Team for use in other resources",
          "type": [
            "object"
          ],
          "properties": {
            "id": {
              "$ref": "#/definitions/team/definitions/id"
            },
            "name": {
              "$ref": "#/definitions/team/definitions/name"
            },
            "url": {
              "$ref": "#/definitions/team/definitions/url"
            },
            "html_url": {
              "$ref": "#/definitions/team/definitions/html_url"
            }
          }
        },
        "partner_data": {
          "$ref": "#/definitions/common/definitions/partner_data"
        },
        "goal": {
          "description": "The monetary goal for this Team. May be 0 cents, in which case it should be treated as if there is no goal.",
          "$ref": "#/definitions/common/definitions/amount"
        },
        "contact_information": {
          "type": [
            "object"
          ],
          "properties": {
            "captain_name": {
              "description": "the public captain name for the team",
              "example": "Helle Hansen",
              "type": [
                "string"
              ]
            },
            "email": {
              "description": "the public contact email for the team",
              "example": "myteam@example.com",
              "type": [
                "string"
              ]
            },
            "phone": {
              "description": "the public contact phone for the team",
              "example": "+4599999999 ex. 1234",
              "type": [
                "string"
              ]
            }
          }
        }
      },
      "description": "A Team is a collection of Fundraisers, who may or may not be raising money in connection with a single Event.",
      "links": [
        {
          "description": "Info for existing team.",
          "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
          "method": "GET",
          "rel": "self",
          "title": "Info"
        },
        {
          "description": "List existing teams.",
          "href": "/teams",
          "method": "GET",
          "rel": "instances",
          "title": "List"
        },
        {
          "description": "Create a team.",
          "href": "/teams",
          "method": "POST",
          "title": "Create",
          "rel": "",
          "schema": {
            "properties": {
              "name": {
                "$ref": "#/definitions/team/definitions/name"
              },
              "description": {
                "$ref": "#/definitions/team/definitions/description"
              },
              "goal": {
                "$ref": "#/definitions/team/definitions/goal"
              },
              "email": {
                "$ref": "#/definitions/person/definitions/email"
              },
              "first_name": {
                "$ref": "#/definitions/person/definitions/first_name"
              },
              "middle_name": {
                "$ref": "#/definitions/person/definitions/middle_name"
              },
              "last_name": {
                "$ref": "#/definitions/person/definitions/last_name"
              },
              "event_id": {
                "$ref": "#/definitions/event/definitions/id"
              },
              "site_id": {
                "$ref": "#/definitions/site/definitions/id"
              },
              "public_captain_name": {
                "$ref": "#/definitions/team/definitions/contact_information/properties/captain_name"
              },
              "public_phone_number": {
                "$ref": "#/definitions/team/definitions/contact_information/properties/phone"
              },
              "public_team_email": {
                "$ref": "#/definitions/team/definitions/contact_information/properties/email"
              }
            },
            "required": [
              "name",
              "description",
              "goal",
              "email",
              "event_id",
              "site_id"
            ]
          }
        },
        {
          "description": "List all Fundraisers that are members of this Team. Fundraisers will be ordered by the amount of money donated, descending",
          "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/fundraisers",
          "method": "GET",
          "rel": "fundraiser",
          "title": "List Fundraisers",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/fundraiser"
            }
          }
        },
        {
          "description": "List all donations given via this Team",
          "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/donations",
          "method": "GET",
          "rel": "donation",
          "title": "List Donations",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/donation"
            }
          }
        },
        {
          "description": "List all Projects that team members are fundraising for",
          "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/projects",
          "method": "GET",
          "rel": "project",
          "title": "List Projects",
          "targetSchema": {
            "items": {
              "$ref": "#/definitions/project"
            }
          }
        }
      ],
      "properties": {
        "captain": {
          "$ref": "#/definitions/team/definitions/captain"
        },
        "cover_media": {
          "$ref": "#/definitions/team/definitions/cover_media"
        },
        "contact_information": {
          "$ref": "#/definitions/team/definitions/contact_information"
        },
        "created_at": {
          "$ref": "#/definitions/team/definitions/created_at"
        },
        "description": {
          "$ref": "#/definitions/team/definitions/description"
        },
        "donations": {
          "$ref": "#/definitions/team/definitions/donations"
        },
        "fundraisers": {
          "$ref": "#/definitions/team/definitions/fundraisers"
        },
        "goal": {
          "$ref": "#/definitions/team/definitions/goal"
        },
        "html_url": {
          "$ref": "#/definitions/team/definitions/html_url"
        },
        "id": {
          "$ref": "#/definitions/team/definitions/id"
        },
        "logo_url": {
          "$ref": "#/definitions/team/definitions/logo_url"
        },
        "name": {
          "$ref": "#/definitions/team/definitions/name"
        },
        "partner_data": {
          "$ref": "#/definitions/team/definitions/partner_data"
        },
        "slug": {
          "$ref": "#/definitions/team/definitions/slug"
        },
        "state": {
          "$ref": "#/definitions/team/definitions/state"
        },
        "updated_at": {
          "$ref": "#/definitions/team/definitions/updated_at"
        },
        "url": {
          "$ref": "#/definitions/team/definitions/url"
        }
      },
      "type": [
        "object"
      ]
    },
    "team_membership": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "Team Membership",
      "description": "Add or remove a fundraiser for a team",
      "links": [
        {
          "description": "Add a fundraiser to a team",
          "href": "/team-memberships",
          "method": "POST",
          "title": "Create",
          "rel": "",
          "schema": {
            "properties": {
              "team_id": {
                "$ref": "#/definitions/team/definitions/id"
              },
              "fundraiser_id": {
                "$ref": "#/definitions/fundraiser/definitions/id"
              }
            },
            "required": [
              "team_id",
              "fundraiser_id"
            ]
          }
        },
        {
          "description": "Delete the association with a team for a fundraiser",
          "href": "/team-memberships/fundraiser_id",
          "method": "DELETE",
          "title": "Destroy",
          "rel": ""
        }
      ],
      "type": [
        "object"
      ]
    },
    "user": {
      "$schema": "http://json-schema.org/draft-04/hyper-schema",
      "title": "User",
      "definitions": {
        "id": {
          "description": "unique identifier of user",
          "example": 1234567,
          "type": [
            "integer"
          ]
        },
        "identity": {
          "$ref": "#/definitions/user/definitions/id"
        },
        "created_at": {
          "description": "when user was created",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "updated_at": {
          "description": "when user was updated",
          "example": "2012-01-01T12:00:00Z",
          "format": "date-time",
          "type": [
            "string"
          ]
        },
        "avatar_url": {
          "description": "The URL for the avatar image for the user. 92x92 pixels",
          "example": "https://cdn.example.net/avatar.jpg",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "private_person_url": {
          "description": "The URL to retreive private information about the user. A secret key is required for this URL",
          "example": "https://api.betternow.org/people/3e9344ff-69be-4ab5-a254-07b067325ebe",
          "format": "uri",
          "type": [
            "string"
          ]
        },
        "first_name": {
          "description": "The first name of the user",
          "example": "Firstname",
          "type": [
            "string"
          ]
        },
        "middle_name": {
          "description": "The middle name of the user (not available in all regions)",
          "example": "Middlename",
          "type": [
            "string"
          ]
        },
        "last_name": {
          "description": "The last name of the user",
          "example": "Lastname",
          "type": [
            "string"
          ]
        },
        "user_summary": {
          "description": "A summarized version of the user",
          "type": [
            "object"
          ],
          "properties": {
            "avatar_url": {
              "$ref": "#/definitions/user/definitions/avatar_url"
            },
            "first_name": {
              "$ref": "#/definitions/user/definitions/first_name"
            },
            "middle_name": {
              "$ref": "#/definitions/user/definitions/middle_name"
            },
            "last_name": {
              "$ref": "#/definitions/user/definitions/last_name"
            },
            "private_person_url": {
              "$ref": "#/definitions/user/definitions/private_person_url"
            }
          }
        }
      },
      "description": "A BetterNow user",
      "properties": {
        "avatar_url": {
          "$ref": "#/definitions/user/definitions/avatar_url"
        },
        "created_at": {
          "$ref": "#/definitions/user/definitions/created_at"
        },
        "first_name": {
          "$ref": "#/definitions/user/definitions/first_name"
        },
        "id": {
          "$ref": "#/definitions/user/definitions/id"
        },
        "last_name": {
          "$ref": "#/definitions/user/definitions/last_name"
        },
        "middle_name": {
          "$ref": "#/definitions/user/definitions/middle_name"
        },
        "updated_at": {
          "$ref": "#/definitions/user/definitions/updated_at"
        }
      },
      "type": [
        "object"
      ]
    }
  },
  "properties": {
    "common": {
      "$ref": "#/definitions/common"
    },
    "donation-detail": {
      "$ref": "#/definitions/donation-detail"
    },
    "donation": {
      "$ref": "#/definitions/donation"
    },
    "event": {
      "$ref": "#/definitions/event"
    },
    "fundraiser": {
      "$ref": "#/definitions/fundraiser"
    },
    "fundraiser_update": {
      "$ref": "#/definitions/fundraiser_update"
    },
    "organisation": {
      "$ref": "#/definitions/organisation"
    },
    "person": {
      "$ref": "#/definitions/person"
    },
    "project": {
      "$ref": "#/definitions/project"
    },
    "site": {
      "$ref": "#/definitions/site"
    },
    "team": {
      "$ref": "#/definitions/team"
    },
    "team_membership": {
      "$ref": "#/definitions/team_membership"
    },
    "user": {
      "$ref": "#/definitions/user"
    }
  },
  "description": "The BetterNow API",
  "id": "betternow-api",
  "links": [
    {
      "href": "https://api.betternow.org",
      "rel": "self"
    }
  ],
  "title": "The BetterNow API"
}
