Orders
List orders
Lists the most recent orders (up to 100) for the locations the app is connected to as POS receiver; has_more indicates additional orders exist. Money is in integer cents; line-item modifiers reflect the directly-selected (first-level) options.
List orders
curl --request GET \
--url https://api.maple.inc/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.maple.inc/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.maple.inc/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maple.inc/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.maple.inc/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.maple.inc/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maple.inc/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "order",
"id": "<string>",
"livemode": true,
"created": 123,
"status": "<string>",
"payment_status": "<string>",
"location_id": "<string>",
"fulfillment_type": "<string>",
"customer": {
"name": "<string>",
"phone_last_four": "<string>"
},
"line_items": [
{
"name": "<string>",
"menu_entity_id": "<string>",
"quantity": 123,
"base_price": 123,
"tax": 123,
"modifiers": [
{
"name": "<string>",
"menu_entity_id": "<string>",
"quantity": 123,
"price": 123
}
]
}
],
"totals": {
"currency": "<string>",
"subtotal": 123,
"tax": 123,
"surcharge": 123,
"tip": 123,
"delivery_fee": 123,
"delivery_tip": 123,
"total": 123
},
"external_id": "<string>",
"payment": {
"provider": "<string>",
"status": "<string>",
"payment_link_url": "<string>"
}
}
],
"has_more": true
}{
"_tag": "DeveloperApiUnauthorized",
"message": "<string>"
}{
"_tag": "DeveloperApiForbidden",
"message": "<string>"
}Was this page helpful?
⌘I
List orders
curl --request GET \
--url https://api.maple.inc/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.maple.inc/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.maple.inc/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maple.inc/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.maple.inc/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.maple.inc/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maple.inc/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "order",
"id": "<string>",
"livemode": true,
"created": 123,
"status": "<string>",
"payment_status": "<string>",
"location_id": "<string>",
"fulfillment_type": "<string>",
"customer": {
"name": "<string>",
"phone_last_four": "<string>"
},
"line_items": [
{
"name": "<string>",
"menu_entity_id": "<string>",
"quantity": 123,
"base_price": 123,
"tax": 123,
"modifiers": [
{
"name": "<string>",
"menu_entity_id": "<string>",
"quantity": 123,
"price": 123
}
]
}
],
"totals": {
"currency": "<string>",
"subtotal": 123,
"tax": 123,
"surcharge": 123,
"tip": 123,
"delivery_fee": 123,
"delivery_tip": 123,
"total": 123
},
"external_id": "<string>",
"payment": {
"provider": "<string>",
"status": "<string>",
"payment_link_url": "<string>"
}
}
],
"has_more": true
}{
"_tag": "DeveloperApiUnauthorized",
"message": "<string>"
}{
"_tag": "DeveloperApiForbidden",
"message": "<string>"
}