List orders
curl --request GET \
--url https://api-eu.flexportal.io/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/orders"
headers = {
"Tenant-ID": "<tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tenant-ID': '<tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api-eu.flexportal.io/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-eu.flexportal.io/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>",
"Tenant-ID: <tenant-id>"
],
]);
$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-eu.flexportal.io/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-ID", "<tenant-id>")
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-eu.flexportal.io/v1/orders")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tenant-ID"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orders": [
{
"orderId": "<string>",
"tenantId": "<string>",
"status": "pending",
"orderType": "standard",
"customer": {
"customerId": "<string>",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"phone": "<string>",
"customerType": "individual"
},
"billingAddress": {
"contactName": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"country": "<string>",
"company": "<string>",
"buildingInfo": "<string>",
"locality": "<string>",
"adminArea": "<string>",
"postalCode": "<string>"
},
"shippingAddress": {
"contactName": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"country": "<string>",
"company": "<string>",
"buildingInfo": "<string>",
"locality": "<string>",
"adminArea": "<string>",
"postalCode": "<string>"
},
"items": [
{
"sku": "<string>",
"productName": "<string>",
"quantity": 2,
"unitPrice": 1,
"contractLength": 123,
"productId": "<string>",
"productImageUrl": "<string>",
"variantId": "<string>",
"listPrice": 1,
"listPriceSource": "unknown",
"acquisitionCost": 1,
"acquisitionCostSource": "unknown",
"listPriceOverride": 1,
"acquisitionCostOverride": 1,
"usedListPriceAsAcquisition": false,
"rentalIds": [],
"rentalStatus": "pending"
}
],
"totals": {
"subtotal": 1,
"total": 1,
"currency": "<string>",
"totalDevices": 2,
"taxAmount": 0
},
"rentalProgress": {
"totalDevices": 1,
"rentedDevices": 1
},
"rentalIds": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"payment": {
"status": "pending",
"method": "stripe",
"transactionId": "<string>",
"paidAmount": 1,
"manuallyMarked": false
},
"customFields": {},
"billingGroupId": "<string>",
"trackingNumber": "<string>",
"shippedAt": "<string>",
"notes": "<string>",
"extensionDetails": {
"originalOrderId": "<string>",
"extensionMonths": 123,
"previousEndDate": "<string>",
"newEndDate": "<string>",
"reason": "<string>"
},
"upgradeDetails": {
"previousDevice": "<string>",
"previousSerialNumber": "<string>",
"previousMonthlyAmount": 123,
"previousRentalId": "<string>",
"upgradeReason": "<string>"
}
}
],
"count": 123,
"limit": 123,
"hasMore": true,
"nextCursor": "<string>"
}Orders
List Orders
Returns a paginated list of orders.
GET
/
v1
/
orders
List orders
curl --request GET \
--url https://api-eu.flexportal.io/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/orders"
headers = {
"Tenant-ID": "<tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tenant-ID': '<tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api-eu.flexportal.io/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-eu.flexportal.io/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>",
"Tenant-ID: <tenant-id>"
],
]);
$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-eu.flexportal.io/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-ID", "<tenant-id>")
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-eu.flexportal.io/v1/orders")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tenant-ID"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orders": [
{
"orderId": "<string>",
"tenantId": "<string>",
"status": "pending",
"orderType": "standard",
"customer": {
"customerId": "<string>",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"phone": "<string>",
"customerType": "individual"
},
"billingAddress": {
"contactName": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"country": "<string>",
"company": "<string>",
"buildingInfo": "<string>",
"locality": "<string>",
"adminArea": "<string>",
"postalCode": "<string>"
},
"shippingAddress": {
"contactName": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"country": "<string>",
"company": "<string>",
"buildingInfo": "<string>",
"locality": "<string>",
"adminArea": "<string>",
"postalCode": "<string>"
},
"items": [
{
"sku": "<string>",
"productName": "<string>",
"quantity": 2,
"unitPrice": 1,
"contractLength": 123,
"productId": "<string>",
"productImageUrl": "<string>",
"variantId": "<string>",
"listPrice": 1,
"listPriceSource": "unknown",
"acquisitionCost": 1,
"acquisitionCostSource": "unknown",
"listPriceOverride": 1,
"acquisitionCostOverride": 1,
"usedListPriceAsAcquisition": false,
"rentalIds": [],
"rentalStatus": "pending"
}
],
"totals": {
"subtotal": 1,
"total": 1,
"currency": "<string>",
"totalDevices": 2,
"taxAmount": 0
},
"rentalProgress": {
"totalDevices": 1,
"rentedDevices": 1
},
"rentalIds": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"payment": {
"status": "pending",
"method": "stripe",
"transactionId": "<string>",
"paidAmount": 1,
"manuallyMarked": false
},
"customFields": {},
"billingGroupId": "<string>",
"trackingNumber": "<string>",
"shippedAt": "<string>",
"notes": "<string>",
"extensionDetails": {
"originalOrderId": "<string>",
"extensionMonths": 123,
"previousEndDate": "<string>",
"newEndDate": "<string>",
"reason": "<string>"
},
"upgradeDetails": {
"previousDevice": "<string>",
"previousSerialNumber": "<string>",
"previousMonthlyAmount": 123,
"previousRentalId": "<string>",
"upgradeReason": "<string>"
}
}
],
"count": 123,
"limit": 123,
"hasMore": true,
"nextCursor": "<string>"
}Overview
Retrieve a paginated list of orders with optional filtering and sorting. Orders represent subscription checkout transactions—each order contains customer information, line items with products and pricing, and fulfillment status.Common Use Cases
Dashboard Integration
Build custom dashboards showing recent orders, fulfillment queues, or revenue reports
Order Management
Display order lists for your operations team to process and fulfill
Customer Portal
Show customers their order history in your customer-facing application
Sync & Export
Sync orders to external systems like ERPs, accounting software, or data warehouses
Filtering Orders
Filter orders by status to power different views in your application:| Status | Description | Typical Action |
|---|---|---|
pending | Order submitted, awaiting confirmation | Review and confirm |
confirmed | Order confirmed, ready for fulfillment | Assign assets and create subscriptions |
partial | Some items fulfilled, others pending | Continue fulfillment |
fulfilled | All items have active subscriptions | Archive or monitor |
cancelled | Order was cancelled | No action needed |
# Get orders awaiting fulfillment
GET /v1/orders?status=confirmed
# Get orders for a specific customer
GET /v1/orders?customerId=cust_abc123
# Combine filters
GET /v1/orders?status=pending&sortBy=createdAt&sortDir=asc
Sorting Options
| Field | Description |
|---|---|
createdAt | Order creation timestamp (default) |
updatedAt | Last modification timestamp |
orderId | Order ID (alphabetical) |
status | Order status |
totals.total | Order total amount |
Pagination
Results are paginated using cursor-based pagination. See Pagination for details.// Fetch all pending orders
const pendingOrders = [];
let cursor = null;
do {
const params = new URLSearchParams({ status: 'pending', limit: '50' });
if (cursor) params.set('startAfter', cursor);
const { orders, nextCursor } = await fetchOrders(params);
pendingOrders.push(...orders);
cursor = nextCursor;
} while (cursor);
Response Fields
Key fields in each order object:| Field | Description |
|---|---|
orderId | Unique order identifier |
status | Current order status |
orderType | standard, extension, or upgrade |
customer | Customer details (email, name, company) |
items | Array of line items with SKU, quantity, pricing |
totals | Order totals (subtotal, tax, total, currency) |
rentalProgress | Fulfillment progress (totalDevices, rentedDevices) |
createdAt | ISO 8601 timestamp |
Related Endpoints
- Get Order - Retrieve a single order by ID
- Create Order - Create a new subscription order
- Create Subscription - Fulfill order items by creating subscriptions
Authorizations
API key obtained from FlexPortal dashboard
Headers
Your tenant identifier
Query Parameters
Items per page (default: 50, max: 100)
Cursor for pagination
Filter by status (pending, confirmed, partial, fulfilled, cancelled)
Filter by customer ID
Was this page helpful?