Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const bonus = await priceos.bonuses.update({
bonusId: "bonus_123",
amount: 150,
reason: "manual_adjustment",
});curl -X PUT "https://api.priceos.com/v1/bonuses/bonus_123" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 150,
"reason": "manual_adjustment"
}'{
"bonus": {
"bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"featureKey": "<string>",
"amount": 123,
"remainingAmount": 123,
"createdAt": 123,
"updatedAt": 123,
"expiresAt": 123,
"reason": "<string>",
"metadata": {}
},
"counterRemaining": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Bonuses
Update Bonus
Update an existing bonus.
PUT
/
v1
/
bonuses
/
{bonusId}
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const bonus = await priceos.bonuses.update({
bonusId: "bonus_123",
amount: 150,
reason: "manual_adjustment",
});curl -X PUT "https://api.priceos.com/v1/bonuses/bonus_123" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 150,
"reason": "manual_adjustment"
}'{
"bonus": {
"bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"featureKey": "<string>",
"amount": 123,
"remainingAmount": 123,
"createdAt": 123,
"updatedAt": 123,
"expiresAt": 123,
"reason": "<string>",
"metadata": {}
},
"counterRemaining": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json