NAV
shell ruby python csharp php

SalesReceipt

The SalesReceipt object

The SalesReceipt object looks like this in JSON:

{
    "object": "sales_receipt",
    "id": 1,
    "receipt_number": 1,
    "transaction_id": 14,
    "online_payment_id": 1,
    "amount": 22,
    "payment_method": "credit_card",
    "reference_number": null,
    "added_at": "2022-07-13T18:32:47+00:00",
    "added_by_id": 10,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
receipt_number Yes int
transaction_id No int
online_payment_id No int
amount Yes decimal
payment_method No enum (cash, check, credit_card, paypal)
reference_number No text (50)
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/salesreceipts" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "filter": {"0":{"logic":"ALL","fields":[{"name":"amount","value":{"type":"RANGE","start":"10.5","end":"900.15"},"positive":1}]}}
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/salesreceipts',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/salesreceipts',
 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/salesreceipts"), 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/salesreceipts');
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": 1,
    "results": 1,
    "results_per_page": 200,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "financial_transaction",
            "id": 14,
            "type": "sales_receipt",
            "status": "posted",
            "number": 1239,
            "posted_on": "2015-03-10",
            "actor_type": "person",
            "actor_id": 12,
            "voided_at": null,
            "voided_by_id": null,
            "link_type": null,
            "link_id": null,
            "amount": 10,
            "reverses": null,
            "reversed_by_id": null,
            "reposts": null,
            "reposted_by_id": null,
            "repostable": true,
            "added_at": "2015-03-10T19:33:11+00:00",
            "added_by_id": null,
            "report_data": {
                "personid": 12,
                "dummyid": "20220xx002",
                "person_name": "Forest, Taylor",
                "orderid": null,
                "source": null,
                "invoiceid": null,
                "invoice_number": null,
                "sales_receipt_id": 1,
                "sales_receipt_secret": "8fe2c10cf09febfa1ec1ac20969ec857",
                "receipt_number": 1,
                "application_fee_id": null,
                "application_fee_name": null,
                "transcript_request_fee_id": null,
                "transcript_request_fee_name": null,
                "form_response_id": null,
                "form_fee_id": null,
                "form_fee_name": null,
                "row_id": 14
            }
        }
    ],
    "sandbox": true
}

Retrieves all SalesReceipt objects that match given filter conditions.

HTTP Request

GET /salesreceipts

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
transaction_number integer
first_name text
last_name text
type choice
source choice
fee object id
posted_date date
amount decimal
tag tag
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/salesreceipts/(salesreceipt)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/salesreceipts/(salesreceipt)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/salesreceipts/(salesreceipt)',
 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/salesreceipts/(salesreceipt)"), 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/salesreceipts/(salesreceipt)');
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": "sales_receipt",
    "id": 1,
    "receipt_number": 1,
    "transaction_id": 14,
    "online_payment_id": 1,
    "amount": 22,
    "payment_method": "credit_card",
    "reference_number": null,
    "added_at": "2022-07-13T18:32:47+00:00",
    "added_by_id": 10,
    "sandbox": true
}

Retrieves a specific SalesReceipt object.

HTTP Request

GET /salesreceipts/(salesreceipt)

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: