Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const result = await priceos.bonuses.list({
customerId: "customer_123",
featureKey: "api_calls",
});curl -X GET "https://api.priceos.com/v1/bonuses?customerId=customer_123&featureKey=api_calls" \
-H "x-api-key: PRICEOS_API_KEY"{
"bonuses": [
{
"bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"featureKey": "<string>",
"amount": 123,
"remainingAmount": 123,
"createdAt": 123,
"updatedAt": 123,
"expiresAt": 123,
"reason": "<string>",
"metadata": {}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Bonuses
List Bonuses
List bonuses for a customer, optionally filtered by feature key.
GET
/
v1
/
bonuses
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const result = await priceos.bonuses.list({
customerId: "customer_123",
featureKey: "api_calls",
});curl -X GET "https://api.priceos.com/v1/bonuses?customerId=customer_123&featureKey=api_calls" \
-H "x-api-key: PRICEOS_API_KEY"{
"bonuses": [
{
"bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"featureKey": "<string>",
"amount": 123,
"remainingAmount": 123,
"createdAt": 123,
"updatedAt": 123,
"expiresAt": 123,
"reason": "<string>",
"metadata": {}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}