NAV
shell ruby python csharp php

LockStudent

The LockStudent object

The LockStudent object looks like this in JSON:

{
    "object": "lock_student",
    "id": 1,
    "person_id": 2,
    "lock_type_id": 1,
    "reason": "Unpaid invoices.",
    "note": null,
    "added_at": "2022-07-13T17:58:35+00:00",
    "added_by_id": 16,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
person_id Yes int
lock_type_id Yes int
reason No text
note No text
added_at No datetime
added_by_id No int
sandbox No bool

index (person)

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/locks" \
-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)/locks',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/locks',
 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)/locks"), 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)/locks');
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": "lock_student",
            "id": 2,
            "person_id": 12,
            "lock_type_id": 1,
            "reason": "Unpaid parking tickets.",
            "note": null,
            "added_at": "2022-08-13T17:58:35+00:00",
            "added_by_id": 16
        }
    ],
    "sandbox": true
}

Retrieves all LockStudent objects tied to a specific Person.

HTTP Request

GET /people/(person)/locks

Parameters

None

Permissions

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

create_lock

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/locks/create" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "lock_type_id": "3"
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/locks/create',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :lock_type_id => '3'
 }.to_json
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/locks/create',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'lock_type_id': '3'
 }
)
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)/locks/create"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  lock_type_id = "3"
});
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)/locks/create');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'lock_type_id' => '3'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "lock_student",
    "id": 4,
    "person_id": 12,
    "lock_type_id": 3,
    "reason": null,
    "note": null,
    "added_at": "2026-07-25T16:24:11+00:00",
    "added_by_id": 22,
    "sandbox": true
}

HTTP Request

GET /people/(person)/locks/create

Parameters

Name Required Data Type Description
lock_type_id Yes int
reason No text
note 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)/locks/(lockstudent)" \
-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)/locks/(lockstudent)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/locks/(lockstudent)',
 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)/locks/(lockstudent)"), 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)/locks/(lockstudent)');
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": "lock_student",
    "id": 2,
    "person_id": 12,
    "lock_type_id": 1,
    "reason": "Unpaid parking tickets.",
    "note": null,
    "added_at": "2022-08-13T17:58:35+00:00",
    "added_by_id": 16,
    "sandbox": true
}

Retrieves a specific LockStudent object.

HTTP Request

GET /people/(person)/locks/(lockstudent)

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_lock

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/locks/(lockstudent)/update" \
-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)/locks/(lockstudent)/update',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.put(
 'https://yourschool.populiweb.com/api2/people/(person)/locks/(lockstudent)/update',
 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)/locks/(lockstudent)/update"), 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)/locks/(lockstudent)/update');
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": "lock_student",
    "id": 2,
    "person_id": 12,
    "lock_type_id": 1,
    "reason": null,
    "note": null,
    "added_at": "2022-08-13T17:58:35+00:00",
    "added_by_id": 16,
    "sandbox": true
}

Updates the lock attribute of an existing LockStudent object.

HTTP Request

PUT /people/(person)/locks/(lockstudent)/update

Parameters

Name Required Data Type Description
reason No text
note No text

Permissions

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

delete_lock

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/locks/(lockstudent)/delete" \
-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)/locks/(lockstudent)/delete',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/locks/(lockstudent)/delete',
 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)/locks/(lockstudent)/delete"), 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)/locks/(lockstudent)/delete');
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": "lock_student",
    "id": 2,
    "deleted": true
}

HTTP Request

GET /people/(person)/locks/(lockstudent)/delete

Parameters

None

Permissions

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