NAV
shell ruby python csharp php

PaymentPeriod

The PaymentPeriod object

The PaymentPeriod object looks like this in JSON:

{
    "object": "payment_period",
    "id": 1,
    "student_id": 12,
    "start_date": "2022-10-01",
    "end_date": "2022-10-31",
    "sap": "not_calculated",
    "sap_policy_id": 1,
    "external_id": null,
    "added_at": "2022-07-13T21:35:04+00:00",
    "added_by_id": 10,
    "updated_at": "2022-07-13T21:35:28+00:00",
    "updated_by_id": 10,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
student_id Yes int
start_date Yes date
end_date Yes date
sap Yes enum (satisfactory, warning, probation, suspension, not_calculated)
sap_policy_id No int
external_id No int
added_at No datetime
added_by_id No int
updated_at No datetime
updated_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/paymentperiods" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "filter": {"0":{"logic":"ALL","fields":[{"name":"end_date","value":{"type":"RANGE","start":"2021-01-01","end":"2022-03-17"},"positive":1}]}}
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/paymentperiods',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/paymentperiods',
 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/paymentperiods"), 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/paymentperiods');
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": "payment_period",
            "id": 1,
            "student_id": 12,
            "start_date": "2022-10-01",
            "end_date": "2022-10-31",
            "sap": "not_calculated",
            "sap_policy_id": 1,
            "external_id": null,
            "added_at": "2022-07-13T21:35:04+00:00",
            "added_by_id": 10,
            "updated_at": "2022-07-13T21:35:28+00:00",
            "updated_by_id": 10,
            "report_data": {
                "student_first_name": "Taylor",
                "student_last_name": "Forest",
                "units_mapped": 0,
                "credits_mapped": "0.00",
                "hours_mapped": "0.00",
                "overriding_sap": null,
                "row_id": 1
            }
        }
    ],
    "sandbox": true
}

Retrieves all PaymentPeriod objects that match given filter conditions.

HTTP Request

GET /paymentperiods

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

Filter Condition Parameters

These conditions can be used to narrow the results returned.

Name Type
student text
start_date date
end_date date
sap enum
units_mapped integer

Permissions

One of the following roles is required to call this method:

show

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/paymentperiods/(paymentperiod)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/paymentperiods/(paymentperiod)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/paymentperiods/(paymentperiod)',
 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/paymentperiods/(paymentperiod)"), 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/paymentperiods/(paymentperiod)');
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": "payment_period",
    "id": 1,
    "student_id": 12,
    "start_date": "2022-10-01",
    "end_date": "2022-10-31",
    "sap": "not_calculated",
    "sap_policy_id": 1,
    "external_id": null,
    "added_at": "2022-07-13T21:35:04+00:00",
    "added_by_id": 10,
    "updated_at": "2022-07-13T21:35:28+00:00",
    "updated_by_id": 10,
    "sandbox": true
}

Retrieves a specific PaymentPeriod object.

HTTP Request

GET /paymentperiods/(paymentperiod)

Parameters

No additional parameters are needed beyond the ID of the object being requested that appears in the URL.

Expandable Properties

Permissions

One of the following roles is required to call this method: