List orders
curl --request GET \
--url https://app.sleetpay.com/api/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sleetpay.com/api/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{
"items": [
{
"id": "<string>",
"invoice_number": "<string>",
"status": "<string>",
"kind": "<string>",
"amount": 123,
"discount_amount": 123,
"tax_amount": 123,
"tax_rate_bp": 123,
"seats": 123,
"currency": "<string>",
"customer_id": "<string>",
"product_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Orders
List orders
GET
/
api
/
v1
/
orders
List orders
curl --request GET \
--url https://app.sleetpay.com/api/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/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://app.sleetpay.com/api/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sleetpay.com/api/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{
"items": [
{
"id": "<string>",
"invoice_number": "<string>",
"status": "<string>",
"kind": "<string>",
"amount": 123,
"discount_amount": 123,
"tax_amount": 123,
"tax_rate_bp": 123,
"seats": 123,
"currency": "<string>",
"customer_id": "<string>",
"product_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Organization access token or OAuth access token. Scopes: products:read (List products and prices); checkouts:read (Read checkout sessions); checkouts:write (Create checkout sessions); customers:read (Read customers); customers:write (Create and update customers); orders:read (Read orders); subscriptions:read (Read subscriptions); subscriptions:write (Cancel and resume subscriptions); license_keys:read (Read license keys and activations); customer_sessions:write (Mint customer portal sessions); events:write (Ingest usage events); meters:read (Read meters); balance:read (Read customer credit balances); credits:write (Transfer prepaid credits between customers); seats:read (Read seat assignments); seats:write (Assign and revoke seats).