Skip to content

Instantly share code, notes, and snippets.

@rococtz
Created March 2, 2021 07:49
Show Gist options
  • Save rococtz/3aefd141656a1d8963701109515123c3 to your computer and use it in GitHub Desktop.
Save rococtz/3aefd141656a1d8963701109515123c3 to your computer and use it in GitHub Desktop.
API Endpoints

Endpoint to retrieve donations

You can currently see this info here: https://www.wrmd.org/reports/generate/donors

Pagination size suggestion: 50

URL: GET /donations?start_date={startDate}&end_date=${endDate}

Response format: JSON

[{
  "wrmdId": "549038",
  "organization": "SomeBigOrganization",
  "firstName": "John",
  "lastName": "Snow",
  "phoneNumber": "0217784457",
  "email": "john.snow@got.com",
  "postalAddress": "6/25 Big Wall Rd",
  "city": "Winterfell",
  "postalCode": "0223",
  "noSolicitations": false,
  "date": "2021-03-01", // preferably ISO format
  "value": 20, (string is also OK)
  "method": "Cash"
}]

Endpoint to retrieve frugal rescuers (admissions without donations)

It's the information you usually find here: https://www.wrmd.org/reports/generate/frugal-rescuers

When people bring in a bird, but they don't make a donation at the of admission.

URL: GET /frugal_rescuers?start_date={startDate}&end_date=${endDate}

Pagination size suggestion: 50

Response format: JSON

[{
  "wrmdId": "32932",
  "organization": "Kingdom",
  "firstName": "Khalesi",
  "lastName": "Shmalisi",
  "phoneNumber": "0288377293",
  "email": "mother.dragon@fire.com",
  "postalAddress": "8 Dragon Ave",
  "city": "Paris",
  "postalCode": "2020",
  "noSolicitations": true,
  "date": "2021-03-01" // preferably ISO format
}]

Endpoint to retrieve a list of birds

This endpoint will be very useful when trying to retrieve a detailed list of birds using certain criteria. One example would be "I want all birds that have disposition X, between the date Y and Z". To rephrase, "I want all birds that were released from 2021/02/01 to 2021/02/08

By disposition by I mean what can be found under LOCATION CARD on the bird page at this url https://www.wrmd.org/continued?y=2020&c=5557 (it's the one at this CSS selector #location-card .panel-body h5)

startDate and endDate can be any format you prefer (ideally ISO string format) and they refer to the disposition start date (the day it was released, died, etc)

URL: GET /birds?disposition={disposition}&start_date={startDate}&end_date=${endDate}

Pagination size suggestion: 50

Response format: JSON

[{
  "disposition": "Released",
  "releaseDate": "20 Feb 2021", // preferably ISO format
  "birdSpecies": "Eagle",
  "daysInCare": 18,
  "firstName": "Ned",
  "lastName": "Stark",
  "email": "ned@winter.com",
  "phone": "0223998843",
  "noSolicitations": false,
  "releaseLocation": "Auckland"
}]

Endpoint to retrieve a list of rescuers

This endpoint will retrieve a list of rescuers that were created between two dates.

URL: GET /rescuers?...

Possible filters (all optional):

  • start_date
  • end_date
  • email
  • phone_number

Pagination size suggestion: 50

Response format: JSON

[{
    wrmdId: '339824',
    organization: 'MyOrganization',
    firstName: 'Jamie',
    lastName: 'Lanyster',
    phoneNumber: '0228893321',
    email: 'jamie@onehand.com',
    postalAddress: '22 Castly Rock Rd',
    city: 'King Landing',
    postalCode: '2211',
    noSolicitations: false,
    admitter: 'John'
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment