NAV
shell ruby python csharp php

Discipline

The Discipline object

The Discipline object looks like this in JSON:

{
    "object": "discipline",
    "id": 9,
    "student_id": 12,
    "discipline_type_id": 5,
    "comment": "Discipline data has been scrubbed from the system to prevent blackmail.",
    "show_on_transcript": true,
    "program_id": null,
    "start_date": "2005-01-28",
    "end_date": "2005-03-31",
    "generate_tag": true,
    "added_at": null,
    "added_by_id": 102,
    "updated_at": null,
    "updated_by_id": null,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
student_id Yes int
discipline_type_id Yes int
comment Yes text
show_on_transcript Yes bool
program_id No int
start_date Yes date
end_date Yes date
generate_tag Yes bool
added_at Yes datetime
added_by_id No int
updated_at Yes datetime
updated_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/discipline" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline',
 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/people/(person)/discipline"), 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/people/(person)/discipline');
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": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "discipline",
            "id": 9,
            "student_id": 12,
            "discipline_type_id": 5,
            "comment": "Discipline data has been scrubbed from the system to prevent blackmail.",
            "show_on_transcript": true,
            "program_id": null,
            "start_date": "2005-01-28",
            "end_date": "2005-03-31",
            "generate_tag": true,
            "discipline_type": {
                "object": "discipline_type",
                "id": 5,
                "name": "Warning",
                "report_as": "warning"
            },
            "added_at": null,
            "added_by_id": 102,
            "updated_at": null,
            "updated_by_id": null
        }
    ],
    "sandbox": true
}

Retrieves all Discipline objects tied to a specific Person.

HTTP Request

GET /people/(person)/discipline

Parameters

None

Permissions

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

create

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/discipline" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X POST
-d '{
    "discipline_type_id": 5,
    "start_date": "2026-01-01"
}' \ 
require 'httparty'
response = HTTParty.post(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :discipline_type_id => 5,
  :start_date => '2026-01-01'
 }.to_json
)
puts response.body
import requests
response = requests.post(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'discipline_type_id': 5,
  'start_date': '2026-01-01'
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/discipline"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  discipline_type_id = 5,
  start_date = "2026-01-01"
});
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/people/(person)/discipline');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'discipline_type_id' => 5,
  'start_date' => '2026-01-01'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "discipline",
    "id": 473,
    "student_id": 12,
    "discipline_type_id": 5,
    "comment": null,
    "show_on_transcript": false,
    "program_id": null,
    "start_date": "2026-01-01T00:00:00-0800",
    "end_date": null,
    "generate_tag": false,
    "added_at": "2026-07-25T16:24:11+00:00",
    "added_by_id": 22,
    "updated_at": "2026-07-25T16:24:11+00:00",
    "updated_by_id": 22,
    "sandbox": true
}

Creates a new Discipline object.

HTTP Request

POST /people/(person)/discipline

Parameters

Name Required Data Type Description
discipline_type_id Yes int
start_date Yes date
end_date No date
program_id No int
show_on_transcript No bool
comment No text

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/people/(person)/discipline/(discipline)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 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/people/(person)/discipline/(discipline)"), 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/people/(person)/discipline/(discipline)');
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": "discipline",
    "id": 9,
    "student_id": 12,
    "discipline_type_id": 5,
    "comment": "Discipline data has been scrubbed from the system to prevent blackmail.",
    "show_on_transcript": true,
    "program_id": null,
    "start_date": "2005-01-28",
    "end_date": "2005-03-31",
    "generate_tag": true,
    "added_at": null,
    "added_by_id": 102,
    "updated_at": null,
    "updated_by_id": null,
    "sandbox": true
}

Retrieves a specific Discipline object.

HTTP Request

GET /people/(person)/discipline/(discipline)

Parameters

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

Permissions

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

update

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X PUT
require 'httparty'
response = HTTParty.put(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.put(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 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/people/(person)/discipline/(discipline)"), Method.Put);
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/people/(person)/discipline/(discipline)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "discipline",
    "id": 9,
    "student_id": 12,
    "discipline_type_id": 5,
    "comment": "Discipline data has been scrubbed from the system to prevent blackmail.",
    "show_on_transcript": true,
    "program_id": null,
    "start_date": "2005-01-28",
    "end_date": "2005-03-31",
    "generate_tag": true,
    "added_at": null,
    "added_by_id": 102,
    "updated_at": null,
    "updated_by_id": null,
    "sandbox": true
}

Updates an existing Discipline object.

HTTP Request

PUT /people/(person)/discipline/(discipline)

Parameters

Name Required Data Type Description
discipline_type_id No int
start_date No date
end_date No date
program_id No int
show_on_transcript No bool
comment No text

Permissions

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

delete

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X DELETE
require 'httparty'
response = HTTParty.delete(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.delete(
 'https://yourschool.populiweb.com/api2/people/(person)/discipline/(discipline)',
 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/people/(person)/discipline/(discipline)"), Method.Delete);
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/people/(person)/discipline/(discipline)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "discipline",
    "id": 9,
    "deleted": true
}

Deletes an existing Discipline object.

HTTP Request

DELETE /people/(person)/discipline/(discipline)

Parameters

No additional parameters are needed beyond the ID of the object to delete that appears in the URL.

Permissions

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