List assets
curl --request GET \
--url https://api-eu.flexportal.io/v1/assets \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/assets"
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/assets', 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/assets",
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/assets"
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/assets")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/assets")
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{
"assets": [
{
"serialNumber": "<string>",
"tenantId": "<string>",
"sku": "<string>",
"productName": "<string>",
"status": "available",
"createdAt": "<string>",
"updatedAt": "<string>",
"productId": "<string>",
"productImageUrl": "<string>",
"variantId": "<string>",
"location": "<string>",
"customerId": "<string>",
"rentalId": "<string>",
"notes": "<string>"
}
],
"count": 123,
"limit": 123,
"hasMore": true,
"nextCursor": "<string>"
}Assets
List Assets
Returns a paginated list of assets in inventory.
GET
/
v1
/
assets
List assets
curl --request GET \
--url https://api-eu.flexportal.io/v1/assets \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/assets"
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/assets', 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/assets",
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/assets"
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/assets")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/assets")
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{
"assets": [
{
"serialNumber": "<string>",
"tenantId": "<string>",
"sku": "<string>",
"productName": "<string>",
"status": "available",
"createdAt": "<string>",
"updatedAt": "<string>",
"productId": "<string>",
"productImageUrl": "<string>",
"variantId": "<string>",
"location": "<string>",
"customerId": "<string>",
"rentalId": "<string>",
"notes": "<string>"
}
],
"count": 123,
"limit": 123,
"hasMore": true,
"nextCursor": "<string>"
}Overview
Retrieve a paginated list of assets with optional filtering and sorting. Assets represent individual physical units tracked by serial number—laptops, phones, e-bikes, or any subscribable equipment in your inventory.Asset Lifecycle
Created → Available → Rented Out → [Returned] → Available/Unavailable
| Status | Description |
|---|---|
available | Ready to be assigned to a subscription |
rented_out | Currently assigned to an active subscription |
unavailable | Not available (sold, damaged, retired, etc.) |
Common Use Cases
Inventory Management
Track all assets across locations and statuses
Order Fulfillment
Find available assets to assign to new subscriptions
Asset Tracking
Monitor which devices are rented and to whom
Reporting
Generate inventory reports by status, SKU, or location
Filtering Assets
# Get available assets ready for orders
GET /v1/assets?status=available
# Get assets by SKU
GET /v1/assets?sku=MACBOOK-PRO-16-M3
# Get rented assets for a specific customer
GET /v1/assets?status=rented_out&customerId=cust_abc123
# Get assets linked to a subscription
GET /v1/assets?rentalId=sub_xyz789
# Combine filters
GET /v1/assets?status=available&sku=MACBOOK-PRO-16-M3&sortBy=createdAt
Sorting Options
| Field | Description |
|---|---|
createdAt | Asset creation date (default) |
updatedAt | Last modification date |
serialNumber | Serial number alphabetically |
status | Asset status |
sku | Product SKU |
Response Fields
Key fields in each asset object:| Field | Description |
|---|---|
serialNumber | Unique asset identifier |
sku | Product variant SKU |
productName | Product display name |
status | Current asset status |
acquisitionCost | Your cost to acquire this asset |
customerId | Current customer (if assigned) |
rentalId | Current subscription ID (if assigned) |
location | Physical location (warehouse, etc.) |
notes | Additional notes |
createdAt | ISO 8601 timestamp |
Example: Find Available Assets for Order
async function findAssetsForOrder(sku, quantity) {
const { assets } = await listAssets({
sku,
status: 'available',
limit: quantity
});
if (assets.length < quantity) {
return {
available: assets.length,
needed: quantity,
shortfall: quantity - assets.length,
message: `Only ${assets.length} of ${quantity} ${sku} available`
};
}
return {
assets: assets.map(a => a.serialNumber),
ready: true
};
}
Example: Inventory Summary
async function getInventorySummary() {
const [available, rentedOut, unavailable] = await Promise.all([
listAssets({ status: 'available', limit: 1 }),
listAssets({ status: 'rented_out', limit: 1 }),
listAssets({ status: 'unavailable', limit: 1 })
]);
return {
available: available.count,
rentedOut: rentedOut.count,
unavailable: unavailable.count,
total: available.count + rentedOut.count + unavailable.count
};
}
Related Endpoints
- Get Asset - Get single asset details
- Create Asset - Add new asset to inventory
- Update Asset - Modify asset details
- Create Subscription - Assign asset to subscription
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 (available, rented_out, returned, sold, unavailable)
Filter by product SKU
Filter by customer ID
Filter by rental ID
Was this page helpful?