https://{{subdomain}}.saplingapp.io/api/v1/beta/profiles?department=Sales
GET /api/v1/beta/profiles?department=Sales HTTP/1.1
Host: {{subdomain}}.saplingapp.io
require "uri"
require "net/http"

url = URI("https://{{subdomain}}.saplingapp.io/api/v1/beta/profiles?department=Sales")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("{{subdomain}}.saplingapp.io")
payload = ''
headers = {}
conn.request("GET", "/api/v1/beta/profiles?department=Sales", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

The filters available on Sapling's API are:

status (i.e. active/ inactive)
start_date
manager
location
department
employment_status
limit
termination_date

https://{{subdomain}}.saplingapp.io/api/v1/beta/profiles?status=active&location=london&department=sales&start_date[since]=2018-01-01&start_date[until]=2019-01-01&manager=312f2a96988-a7b6-4db6-b6e6-15f31f145836
GET /api/v1/beta/profiles?status=active&location=london&department=sales&start_date[since]=2018-01-01&start_date[until]=2019-01-01&manager=312f2a96988-a7b6-4db6-b6e6-15f31f145836 HTTP/1.1
Host: {{subdomain}}.saplingapp.io

You can also string multiple filters and attributes together to combine as many different filters as they like.

This can be helpful when seeking to find users from individual locations, departments or employment statuses.

.