Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const featureAccess = await priceos.features.getAccess("customer_123");
const hasPrioritySupport = featureAccess.priority_support?.hasAccess;curl -X GET "https://api.priceos.com/v1/feature-access?customerId=customer_123" \
-H "x-api-key: PRICEOS_API_KEY"{
"api_calls": {
"hasAccess": true,
"type": "limit",
"limit": 1000,
"isUnlimited": false,
"usage": {
"used": 120,
"remaining": 880,
"bonusRemaining": 25,
"hasReachedLimit": false,
"bonusUsed": 5,
"nextReset": 1738368000000,
"lastReset": 1735689600000
}
},
"team_seats": {
"hasAccess": true,
"type": "boolean"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Core
Get Feature Access
Return feature access for a customer.
GET
/
v1
/
feature-access
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const featureAccess = await priceos.features.getAccess("customer_123");
const hasPrioritySupport = featureAccess.priority_support?.hasAccess;curl -X GET "https://api.priceos.com/v1/feature-access?customerId=customer_123" \
-H "x-api-key: PRICEOS_API_KEY"{
"api_calls": {
"hasAccess": true,
"type": "limit",
"limit": 1000,
"isUnlimited": false,
"usage": {
"used": 120,
"remaining": 880,
"bonusRemaining": 25,
"hasReachedLimit": false,
"bonusUsed": 5,
"nextReset": 1738368000000,
"lastReset": 1735689600000
}
},
"team_seats": {
"hasAccess": true,
"type": "boolean"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}