BookstoreOrder
The BookstoreOrder object
The BookstoreOrder object looks like this in JSON:
{
"object": "bookstore_order",
"id": 10,
"type": "",
"user_id": null,
"first_name": "James",
"last_name": "Hill",
"email": "jjames@yahoo.com",
"phone": "555-995-4444 x 4401",
"transaction_id": null,
"shipping_method_id": null,
"carrier_id": 0,
"tracking_number": null,
"secret": "a4afg174197c5a",
"source": "internet",
"ship_to_name": null,
"ship_to_street": "111 Bobski Ln",
"ship_to_city": "Bobtecka",
"ship_to_state": "IA",
"ship_to_postal": "8888",
"ship_to_country": null,
"is_picking_up": true,
"item_total": 109.5,
"item_discount": 0,
"return_item_total": 0,
"shipping": 0,
"shipping_discount": 0,
"tax_exempt": false,
"tax": 7.11,
"return_tax": 0,
"total": 116.61,
"status": "fulfilled",
"payment_gateway_id": null,
"placed_at": "2019-11-05T20:58:06+00:00",
"fulfilled_at": null,
"voided_at": null,
"academic_term_id": null,
"online_amount": 0,
"cash_amount": 0,
"check_amount": 0,
"on_account_amount": 0,
"refund_on_account_amount": 0,
"refund_tax_on_account_amount": 0,
"check_reference_number": null,
"special_instructions": null,
"tax_on_account": false,
"shipping_on_account": false,
"suspended_by_id": null,
"suspended_at": null,
"added_at": "2009-11-11T19:57:53+00:00",
"added_by_id": null,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | No | int |
| type | Yes | enum (bookstore, course) |
| user_id | Yes | int |
| first_name | Yes | text (50) |
| last_name | Yes | text (50) |
| Yes | text (50) | |
| phone | Yes | text (50) |
| transaction_id | Yes | int |
| shipping_method_id | Yes | int |
| carrier_id | Yes | int |
| tracking_number | No | text (100) |
| secret | Yes | text (60) |
| source | Yes | enum (internet, point_of_sale) |
| ship_to_name | Yes | text (75) |
| ship_to_street | Yes | text (150) |
| ship_to_city | Yes | text (100) |
| ship_to_state | Yes | text (50) |
| ship_to_postal | Yes | text (50) |
| ship_to_country | Yes | text (50) |
| is_picking_up | Yes | bool |
| item_total | Yes | decimal |
| item_discount | Yes | decimal |
| return_item_total | Yes | decimal |
| shipping | Yes | decimal |
| shipping_discount | Yes | decimal |
| tax_exempt | Yes | bool |
| tax | Yes | decimal |
| return_tax | Yes | decimal |
| total | Yes | decimal |
| status | Yes | enum (construction, processing, void, pending, fulfilled) |
| payment_gateway_id | No | int |
| placed_at | No | datetime |
| fulfilled_at | No | datetime |
| voided_at | No | datetime |
| academic_term_id | No | int |
| online_amount | Yes | decimal |
| cash_amount | Yes | decimal |
| check_amount | Yes | decimal |
| on_account_amount | Yes | decimal |
| refund_on_account_amount | Yes | decimal |
| refund_tax_on_account_amount | Yes | decimal |
| check_reference_number | Yes | text (100) |
| special_instructions | No | text (1000) |
| tax_on_account | Yes | bool |
| shipping_on_account | Yes | bool |
| suspended_by_id | No | int |
| suspended_at | No | datetime |
| 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/orders" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"filter": {"0":{"logic":"ALL","fields":[{"name":"last_name","value":{"type":"CONTAINS","text":"blah"},"positive":1}]}}
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/orders',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/orders',
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/orders"), 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/orders');
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": "bookstore_order",
"id": 10,
"type": "",
"user_id": null,
"first_name": "James",
"last_name": "Hill",
"email": "jjames@yahoo.com",
"phone": "555-995-4444 x 4401",
"transaction_id": null,
"shipping_method_id": null,
"carrier_id": 0,
"tracking_number": null,
"secret": "a4afg174197c5a",
"source": "internet",
"ship_to_name": null,
"ship_to_street": "111 Bobski Ln",
"ship_to_city": "Bobtecka",
"ship_to_state": "IA",
"ship_to_postal": "8888",
"ship_to_country": null,
"is_picking_up": true,
"item_total": 109.5,
"item_discount": 0,
"return_item_total": 0,
"shipping": 0,
"shipping_discount": 0,
"tax_exempt": false,
"tax": 7.11,
"return_tax": 0,
"total": 116.61,
"status": "fulfilled",
"payment_gateway_id": null,
"placed_at": "2019-11-05T20:58:06+00:00",
"fulfilled_at": null,
"voided_at": null,
"academic_term_id": null,
"online_amount": 0,
"cash_amount": 0,
"check_amount": 0,
"on_account_amount": 0,
"refund_on_account_amount": 0,
"refund_tax_on_account_amount": 0,
"check_reference_number": null,
"special_instructions": null,
"tax_on_account": false,
"shipping_on_account": false,
"suspended_by_id": null,
"suspended_at": null,
"added_at": "2009-11-11T19:57:53+00:00",
"added_by_id": null,
"report_data": {
"shipping_method_name": null
}
}
],
"sandbox": true
}
Retrieves all BookstoreOrder objects that match given filter conditions.
HTTP Request
GET /orders
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
- items
- return_items
- discount_codes
- refunded_cards
- shipping_method
- online_payments
Filter Condition Parameters
These conditions can be used to narrow the results returned.
| Name | Type |
|---|---|
| placed | datetime |
| first_name | text |
| last_name | text |
| shipping_method | object id |
| discount_code | object id |
| source | choice |
| status | choice |
| total | decimal |
Permissions
One of the following roles is required to call this method:
- Campus Store
- Financial Auditor
- Campus Store Admin
- Financial Admin
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/orders/(bookstoreorder)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/orders/(bookstoreorder)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/orders/(bookstoreorder)',
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/orders/(bookstoreorder)"), 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/orders/(bookstoreorder)');
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": "bookstore_order",
"id": 10,
"type": "",
"user_id": null,
"first_name": "James",
"last_name": "Hill",
"email": "jjames@yahoo.com",
"phone": "555-995-4444 x 4401",
"transaction_id": null,
"shipping_method_id": null,
"carrier_id": 0,
"tracking_number": null,
"secret": "a4afg174197c5a",
"source": "internet",
"ship_to_name": null,
"ship_to_street": "111 Bobski Ln",
"ship_to_city": "Bobtecka",
"ship_to_state": "IA",
"ship_to_postal": "8888",
"ship_to_country": null,
"is_picking_up": true,
"item_total": 109.5,
"item_discount": 0,
"return_item_total": 0,
"shipping": 0,
"shipping_discount": 0,
"tax_exempt": false,
"tax": 7.11,
"return_tax": 0,
"total": 116.61,
"status": "fulfilled",
"payment_gateway_id": null,
"placed_at": "2019-11-05T20:58:06+00:00",
"fulfilled_at": null,
"voided_at": null,
"academic_term_id": null,
"online_amount": 0,
"cash_amount": 0,
"check_amount": 0,
"on_account_amount": 0,
"refund_on_account_amount": 0,
"refund_tax_on_account_amount": 0,
"check_reference_number": null,
"special_instructions": null,
"tax_on_account": false,
"shipping_on_account": false,
"suspended_by_id": null,
"suspended_at": null,
"added_at": "2009-11-11T19:57:53+00:00",
"added_by_id": null,
"sandbox": true
}
Retrieves a specific BookstoreOrder object.
HTTP Request
GET /orders/(bookstoreorder)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- items
- return_items
- discount_codes
- refunded_cards
- shipping_method
- online_payments
Permissions
One of the following roles is required to call this method:
- Campus Store
- Financial Auditor
- Campus Store Admin
- Financial Admin