Dartmouth API Developer Portal
Account Balances
This API returns information about DA$H account balances.
It is the responsibility of the API consumer to ensure that account balance informtion is only made available to appropriate end users.
Notes on usage
Returns resources describing a specific "accounts", where an "account" is the combination of an individual and a "plan".
All accounts are represented, and the account holders may include students, staff, faculty, and other non-person accounts.
The Resource ID for an individual resource is a concatenation of the account holder's NetID and the Plan ID (e.g. "f000123_40").
Requests
GET /dining/account_balances
GET /dining/account_balances/f000123_40
GET /dining/account_balances?netid=f00123
Required Scopes
Scope | Description |
---|---|
"urn:dartmouth:dining.account_balances:read" | This scope is required for any results to be returned. No further document or attribute level access is configured. |
Required Headers
Authorization: Bearer {jwt}
Search paramenters
Searching is allowed on any of the resource attributes in the query parameters. For example, to query all account balances for a netid:
GET /dining/account_balances?netid=f000123
Paging
Any collection GET will include return headers allowing paging:
X-Request-ID: 66da34c9-569f-484b-b48e-49634efa7fc1
X-Total-Count: 99696
Subsequent pages can be accessed by specifying the continuation key, page size, and page number:
GET /dining/account_balances?continuation_key=66da34c9-569f-484b-b48e-49634efa7fc1&page=2&pagesize=100
Attribute Definitions
All "dates" are ISO8601 date formatted strings
Attribute | Type | Notes |
---|---|---|
netid | string | |
account_id | string | |
balance | string | String with no leading zeroes, two digits after decimal. May begin with negative sign. |
plan_min_balance | string | "None" or String with no leading zeroes, two digits after decimal. May begin with negative sign. |
description | string | Plan description |
balance_date | date | |
plan_id | string | |
cache_date | string | When this resource was last refreshed |
Sample Collection Search Request
https://api.dartmouth.edu/api/dining/account_balances?netid=f000123
Sample Collection Return
[
{
"netid": "f000123",
"account_id": "f000123_40",
"balance": "0.00",
"plan_min_balance": "-100.00",
"description": "Discretionary",
"balance_date": "2019-05-20T08:41:07Z",
"plan_id": "40",
"cache_date": "2019-10-31T10:25:44Z"
},
{
"netid": "f000123",
"account_id": "f000123_41",
"balance": "0.00",
"plan_min_balance": "None",
"description": "Fees & Fines",
"balance_date": "2019-05-20T08:40:27Z",
"plan_id": "41",
"cache_date": "2019-10-31T10:25:44Z"
}
]
Sample Resource Request
https://api.dartmouth.edu/api/dining/account_balances/f000123_40
Sample Resource Return
{
"netid": "f000123",
"account_id": "f000123_40",
"balance": "0.00",
"plan_min_balance": "-100.00",
"description": "Discretionary",
"balance_date": "2019-05-20T08:41:07Z",
"plan_id": "40",
"cache_date": "2019-10-31T10:25:44Z"
}