NAV
shell ruby python csharp php

Invoice

The Invoice object

The Invoice object looks like this in JSON:

{
    "object": "invoice",
    "id": 7,
    "actor_type": "person",
    "actor_id": 1,
    "number": 1,
    "description": null,
    "transaction_id": 9,
    "amount": 1234.56,
    "due_on": "2009-04-07",
    "status": "unpaid",
    "marked_uncollectible_on": null,
    "posted_on": "2015-03-10",
    "academic_term_id": null,
    "items": [
        {
            "object": "invoice_item",
            "id": 6,
            "invoice_id": 7,
            "item_type": "fee",
            "item_id": 9,
            "name": null,
            "amount": 20,
            "description": "Parking Ticket"
        }
    ],
    "sandbox": true
}
Attribute Required Data Type
id Yes int
actor_type Yes enum (person, contact_org)
actor_id Yes int
number Yes int
description Yes text
transaction_id Yes int
amount Yes decimal
due_on Yes date
status No enum (unpaid, paid, uncollectible)
marked_uncollectible_on No date
posted_on No date
academic_term_id Yes int
items No Array of InvoiceItem objects
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/invoices" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "filter": {"0":{"logic":"ALL","fields":[{"name":"balance","value":{"type":"RANGE","start":"10.5","end":"900.15"},"positive":1}]}}
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/invoices',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/invoices',
 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/invoices"), 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/invoices');
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": "invoice",
            "id": 100,
            "actor_type": "person",
            "actor_id": 12,
            "number": 4,
            "description": null,
            "transaction_id": 100,
            "amount": 4000,
            "due_on": "2009-04-07",
            "status": "unpaid",
            "marked_uncollectible_on": null,
            "report_data": {
                "amount_paid": "600.00",
                "balance": "3400.00",
                "overdue": 1,
                "term_name": null,
                "term_start_date": null,
                "firstname": "Taylor",
                "lastname": "Forest",
                "preferred_name": "",
                "display_name": "Taylor Forest",
                "personid": 12,
                "studentid": 12,
                "posted_date": "2015-03-13",
                "dummyid": "20220xx002",
                "person_amount_paid": "600.00",
                "org_amount_paid": "0.00",
                "aid_amount_paid": "0.00",
                "plan_name": null,
                "scheduled_aid_handling": null,
                "recurring_money_transfer_linkable_term_level": null,
                "recurring_money_transfer_linkable_existing": null,
                "on_term_level_payment_plan": 0,
                "invoice_due_date": "2009-04-07",
                "on_payment_plan": 0,
                "on_plan_total": null,
                "plan_due_date": null,
                "row_id": 100
            },
            "posted_on": "2015-03-13",
            "academic_term_id": null,
            "items": []
        }
    ],
    "sandbox": true
}

Retrieves all Invoice objects that match given filter conditions.

HTTP Request

GET /invoices

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 object_id
invoice_number integer
academic_term object_id
academic_term_type academic_term_type
posted_date date
status enum
invoice_due_date date
payment_plan_due_date date
total_amount decimal
amount_paid decimal
balance decimal
student_campus object id
tag tag
on_payment_plan bool
added_time datetime
lock_type locktype
custom_field custom

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/invoices/(invoice)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/invoices/(invoice)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/invoices/(invoice)',
 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/invoices/(invoice)"), 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/invoices/(invoice)');
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": "invoice",
    "id": 7,
    "actor_type": "person",
    "actor_id": 1,
    "number": 1,
    "description": null,
    "transaction_id": 9,
    "amount": 1234.56,
    "due_on": "2009-04-07",
    "status": "unpaid",
    "marked_uncollectible_on": null,
    "posted_on": "2015-03-10",
    "academic_term_id": null,
    "items": [
        {
            "object": "invoice_item",
            "id": 6,
            "invoice_id": 7,
            "item_type": "fee",
            "item_id": 9,
            "name": null,
            "amount": 20,
            "description": "Parking Ticket"
        }
    ],
    "sandbox": true
}

Retrieves a specific Invoice object.

HTTP Request

GET /invoices/(invoice)

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: