NAV
shell ruby python csharp php

PopuliInvoice

The PopuliInvoice object

The PopuliInvoice object looks like this in JSON:

{
    "object": "populi_invoice",
    "id": 1,
    "issue_date": "2010-10-01",
    "invoice_number": 500,
    "amount": 199,
    "status": "paid",
    "due_date": "2010-10-30",
    "sandbox": true
}
Attribute Required Data Type
id No int
issue_date Yes date
invoice_number Yes int
amount No decimal
status No enum (unpaid, paid, uncollectible)
due_date No date
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/populiinvoices" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/populiinvoices',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/populiinvoices',
 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/populiinvoices"), 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/populiinvoices');
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": 4,
    "results": 4,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "populi_invoice",
            "id": 37,
            "issue_date": "2015-05-05",
            "invoice_number": 111,
            "amount": 123,
            "status": "paid",
            "due_date": "2015-05-20"
        }
    ],
    "sandbox": true
}

These are invoices sent to your school monthly for using Populi.

HTTP Request

GET /populiinvoices

Parameters

None

Permissions

Only keys that have been granted Populi Account Administrator permissions may call this method.

show

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/populiinvoices/(populiinvoice)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/populiinvoices/(populiinvoice)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/populiinvoices/(populiinvoice)',
 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/populiinvoices/(populiinvoice)"), 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/populiinvoices/(populiinvoice)');
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": "populi_invoice",
    "id": 37,
    "issue_date": "2015-05-05",
    "invoice_number": 111,
    "amount": 123,
    "status": "paid",
    "due_date": "2015-05-20",
    "sandbox": true
}

Retrieves a specific PopuliInvoice object.

HTTP Request

GET /populiinvoices/(populiinvoice)

Parameters

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

Expandable Properties

Permissions

Only keys that have been granted Populi Account Administrator permissions may call this method.