Skip to main content
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",
});
{
  "bonus": {
    "bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "featureKey": "<string>",
    "amount": 123,
    "remainingAmount": 123,
    "createdAt": 123,
    "updatedAt": 123,
    "expiresAt": 123,
    "reason": "<string>",
    "metadata": {}
  },
  "counterRemaining": 123
}

Headers

x-api-key
string
required

API key from your PriceOS dashboard.

Path Parameters

bonusId
string<uuid>
required

Bonus ID.

Body

application/json
amount
number

Optional updated bonus amount.

expiresAt
integer | null

Optional Unix timestamp (ms) when the bonus expires. Use null to clear.

reason
string | null

Optional reason for the bonus. Use null to clear.

metadata
object

Optional metadata for the bonus (string key/value pairs). Use null to clear.

Response

Bonus updated

Bonus update result.

bonus
object
required

Updated bonus.

counterRemaining
number
required

Total remaining bonus amount for this customer + feature.