Credit
The Credit object
The Credit object looks like this in JSON:
{
"object": "credit",
"id": 8,
"actor_type": "person",
"actor_id": 1,
"number": 2,
"description": null,
"transaction_id": 10,
"amount": 1234.56,
"due_on": "2009-04-07",
"status": null,
"posted_on": "2015-03-10",
"academic_term_id": null,
"items": [],
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| actor_type | Yes | enum (person, contact_org) |
| actor_id | Yes | int |
| number | Yes | int |
| description | Yes | text |
| transaction_id | Yes | int |
| amount | Yes | decimal |
| due_on | Yes | date |
| status | No | enum (unpaid, paid, uncollectible) |
| posted_on | No | date |
| academic_term_id | Yes | int |
| items | No | Array of InvoiceItem objects |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/credits" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"filter": []
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/credits',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/credits',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/credits"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/credits');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 2,
"results": 2,
"results_per_page": 200,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "credit",
"id": 9,
"actor_type": "person",
"actor_id": 12,
"number": 3,
"description": null,
"transaction_id": 11,
"amount": 1234.56,
"due_on": "2009-04-07",
"status": null,
"report_data": {
"term_name": null,
"term_start_date": null,
"firstname": "Alice",
"lastname": "Admin",
"preferred_name": "",
"display_name": "Alice Admin",
"personid": 12,
"studentid": 12,
"posted_date": "2015-03-10",
"dummyid": "20220xx002"
},
"posted_on": "2015-03-10",
"academic_term_id": null,
"items": []
}
],
"sandbox": true
}
Retrieves all Credit objects that match given filter conditions.
HTTP Request
GET /credits
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| filter | No | mixed | See available filter conditions |
| page | No | int | The page of results to return if more than 200 records are found. |
Expandable Properties
- items
- payments
- credits
- courses
- scheduled_aid
Filter Condition Parameters
These conditions can be used to narrow the results returned.
| Name | Type |
|---|---|
| student | object_id |
| credit_number | integer |
| academic_term | object_id |
| academic_term_type | academic_term_type |
| posted_date | date |
| total_amount | decimal |
| student_campus | object id |
| tag | tag |
| added_time | datetime |
| custom_field | custom |
Permissions
One of the following roles is required to call this method:
- Financial Auditor
- Financial Admin
- Student Billing
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/credits/(credit)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/credits/(credit)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/credits/(credit)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/credits/(credit)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/credits/(credit)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "credit",
"id": 8,
"actor_type": "person",
"actor_id": 1,
"number": 2,
"description": null,
"transaction_id": 10,
"amount": 1234.56,
"due_on": "2009-04-07",
"status": null,
"posted_on": "2015-03-10",
"academic_term_id": null,
"items": [],
"sandbox": true
}
Retrieves a specific Credit object.
HTTP Request
GET /credits/(credit)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- items
- payments
- credits
- courses
- scheduled_aid
Permissions
One of the following roles is required to call this method:
- Financial Auditor
- Financial Admin
- Student Billing