PrintLayout
The PrintLayout object
The PrintLayout object looks like this in JSON:
{
"object": "print_layout",
"id": 6,
"name": "Standard letter",
"print_layout_type_id": 1,
"active_revision": null,
"default": true,
"template_type": "odt",
"content": null,
"subtype": null,
"added_at": "2010-05-06T22:07:20+00:00",
"added_by_id": 1257,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| name | Yes | text (200) |
| print_layout_type_id | Yes | int |
| active_revision | No | int |
| default | Yes | bool |
| template_type | Yes | enum (odt, html) |
| content | No | text |
| subtype | No | text (500) |
| added_at | No | datetime |
| added_by_id | No | int |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/printlayouts" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/printlayouts',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/printlayouts',
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/printlayouts"), 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/printlayouts');
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": 0,
"results": 0,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [],
"sandbox": true
}
Retrieves all PrintLayout objects.
HTTP Request
GET /printlayouts
Parameters
None
Permissions
One of the following roles is required to call this method:
- Staff
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/printlayouts/(printlayout)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/printlayouts/(printlayout)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/printlayouts/(printlayout)',
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/printlayouts/(printlayout)"), 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/printlayouts/(printlayout)');
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": "print_layout",
"id": 6,
"name": "Standard letter",
"print_layout_type_id": 1,
"active_revision": null,
"default": true,
"template_type": "odt",
"content": null,
"subtype": null,
"added_at": "2010-05-06T22:07:20+00:00",
"added_by_id": 1257,
"sandbox": true
}
Retrieves a specific PrintLayout object.
HTTP Request
GET /printlayouts/(printlayout)
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:
- Staff
types
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/printlayouttypes" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/printlayouttypes',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/printlayouttypes',
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/printlayouttypes"), 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/printlayouttypes');
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": 28,
"results": 28,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "print_layout_type",
"id": 28,
"name": "APPLICATION",
"display_name": "Admissions Application"
}
],
"sandbox": true
}
HTTP Request
GET /printlayouttypes
Parameters
None
Permissions
One of the following roles is required to call this method:
- Staff