Skip to content

Instantly share code, notes, and snippets.

@arrel
Last active September 9, 2022 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arrel/dec7edf0f02ba624453bf261e89dc881 to your computer and use it in GitHub Desktop.
Save arrel/dec7edf0f02ba624453bf261e89dc881 to your computer and use it in GitHub Desktop.

Circle

A Circle represents a group on Grapevine, with members who pool their donations and decide together where to grant them.

List API Request

GET https://api.grapevine.org/public/circles
pageSize (number): OPTIONAL number of results per page, default 20
pageToken (string): OPTIONAL pagination token returned as nextPageToken in responses
circleId (string): OPTIONAL comma-delimited list of Circle ids
cause (string): OPTIONAL comma-delimited list of Cause tokens, returns groups with at least one of these tokens
network (string): OPTIONAL comma-delimited list of Network tokens, returns groups with at least one of these tokens

Example Request

curl https://api.grapevine.org/public/donations \
  -d cause=arts-and-culture,education \
  -d network=philanos \
  -d pageSize=10 \
  -d pageToken=cD00NjgyOQ== \
  -G

Example API Response

{
  items: [{
      "id": "abc123",
      "createdTime": "2021-07-23T22:28:37.784788Z",
      "name": "Test Circle",
      "description": "A little something about this giving circle.",
      "heroImage": "https://s3.amazonaws.com/uploads/abc.jpg",
      "profileImage": "https://s3.amazonaws.com/uploads/def.jpg",
      "url": "https://www.grapevine.org/c/abc123",
      "memberCount": 42,
      "networks": [{ "token": "education" }, { "token": "housing" }]
      "causes": [{ "token": "philanos" }],
      "donationStats": {
        "donorCount": 5,
        "donationCount": 130,
        "netAmount": "15405.43",
        "totalAmount": "15790.33",
        "scheduledAmount": "575.40",
        "scheduledNetAmount": "562.85",
        "targetedAmount": "15114.93",
        "targetedNetAmount": "1470.11",
        "offlineTotalAmount": "0.00",
        "offlineNetAmount": "0.00",
        "offlineTargetedAmount": "0.00",
        "offlineTargetedNetAmount": "0.00",
      },
  }],
  count: 123,
  nextPageToken: "dkeKRe==",
}

Attributes

id (string): Unique identifier of the Circle
createdTime (timestamp): ISO 8601 formatted timestamp
name (string): Name of the Circle
description (string): Description of the Circle, supports minimal HTML (links, bold, italics)
heroImage (url): URL pointing to landscape image representing the Circle
profileImage (url): URL pointing to square image representing the Circle
url (url): URL pointing to the homepage of the Circle on grapevine.org
memberCount (number): number of members in the Circle
networks (Network[]): List of Network tokens representing the affiliated giving circle network
causes (Cause[]): List of Cause tokens representing nonprofit causes the group supports
donationStats (DonationStats): Set of statistics about funds the giving circle has raised

Network

Attributes

token (string): String representing the network a Circle is part of, e.g. "100-who-care-alliance" for The 100 Who Care Alliance

Cause

Attributes

token (string): String representing the cause e.g. "arts-and-culture" or "education"

Donation Stats

A collection of data representing donation activity within a Circle

Attributes

donorCount (number): Number of unique donors to the Circle
donationCount (number): Total number of donations made
totalAmount (currency): USD amount raised from all donations, written as a string, e.g. "12.25" for $12.25
netAmount (currency): USD amount raised from all donations minus transaction fees
scheduledAmount (currency): USD amount scheduled for contribution
scheduledNetAmount (currency): USD amount scheduled for contribution minus transaction fees
targetedAmount (currency): USD amount of totalAmount allocated for selected nonprofits
targetedNetAmount (currency): USD amount of netAmount allocated for selected nonprofits
offlineTotalAmount (currency): USD amount raised off of grapevine (e.g. cash, checks sent directly to a nonprofit)
offlineNetAmount (currency): USD amount raised off of grapevine minus transaction fees
offlineTargetedAmount (currency): USD amount of offlineTotalAmount allocated for selected nonprofits
offlineTargetedNetAmount (currency): USD amount of offlineNetAmount allocated for selected nonprofits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment