Get an asset
curl --request GET \
--url https://api-eu.flexportal.io/v1/assets/{serialNumber} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/assets/{serialNumber}"
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/{serialNumber}', 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/{serialNumber}",
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/{serialNumber}"
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/{serialNumber}")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/assets/{serialNumber}")
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{
"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>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Assets
Get Asset
Retrieves a specific asset by serial number.
GET
/
v1
/
assets
/
{serialNumber}
Get an asset
curl --request GET \
--url https://api-eu.flexportal.io/v1/assets/{serialNumber} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-ID: <tenant-id>'import requests
url = "https://api-eu.flexportal.io/v1/assets/{serialNumber}"
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/{serialNumber}', 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/{serialNumber}",
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/{serialNumber}"
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/{serialNumber}")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/assets/{serialNumber}")
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{
"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>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Overview
Retrieve details for a single asset by its serial number. Assets are identified by their unique serial number (not an auto-generated ID), making it easy to look up devices using manufacturer serial numbers or your own identifiers.Common Use Cases
- Warehouse Lookup: Scan a barcode/serial number to get asset details
- Support Queries: Find asset info during customer support calls
- Pre-Assignment Check: Verify asset details before creating a subscription
- Audit Trail: Track asset history and current assignment
Response Fields
| Field | Description |
|---|---|
serialNumber | Unique asset identifier |
sku | Product variant SKU |
productName | Product display name |
status | available, rented_out, returned, sold, or unavailable |
acquisitionCost | Your cost to acquire |
acquisitionDate | When the asset was acquired |
customerId | Current customer (if assigned) |
rentalId | Current subscription ID (if assigned) |
location | Physical location |
condition | Asset condition notes |
notes | Additional notes |
createdAt | When asset was added to system |
updatedAt | Last modification timestamp |
Asset Status Details
| Status | Meaning | Typical Scenario |
|---|---|---|
available | Ready for subscription | In warehouse, ready to ship |
rented_out | Assigned to subscription | With customer |
unavailable | Not available | Damaged, sold, retired, or in repair |
Example: Warehouse Scan Lookup
async function handleBarcodeScan(serialNumber) {
try {
const asset = await getAsset(serialNumber);
return {
found: true,
product: asset.productName,
sku: asset.sku,
status: asset.status,
location: asset.location,
canAssign: asset.status === 'available',
currentCustomer: asset.customerId || null
};
} catch (error) {
if (error.code === 'NOT_FOUND') {
return { found: false, serialNumber };
}
throw error;
}
}
Example: Check Before Assignment
async function canAssignToOrder(serialNumber, orderSku) {
const asset = await getAsset(serialNumber);
const issues = [];
if (asset.status !== 'available') {
issues.push(`Asset is ${asset.status}, not available`);
}
if (asset.sku !== orderSku) {
issues.push(`SKU mismatch: asset is ${asset.sku}, order needs ${orderSku}`);
}
return {
canAssign: issues.length === 0,
issues
};
}
Related Endpoints
- List Assets - Browse all assets
- Update Asset - Modify asset details
- Create Subscription - Assign asset to subscription
- Get Subscription - View subscription using this asset
Authorizations
API key obtained from FlexPortal dashboard
Headers
Your tenant identifier
Path Parameters
The asset serial number
Response
Asset details
Available options:
available, rented_out, returned, sold, unavailable Was this page helpful?