Skip to main content

List bonuses

const { bonuses } = 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"
For more details, see List bonuses.

Update a bonus

const result = await priceos.bonuses.update({
  bonusId: "9e9be7e5-55d2-4b44-93af-c3687f4b8af5",
  amount: 150,
  expiresAt: null, // clear expiration
  reason: "manual_adjustment",
});
curl -X PUT "https://api.priceos.com/v1/bonuses/9e9be7e5-55d2-4b44-93af-c3687f4b8af5" \
  -H "x-api-key: PRICEOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 150,
    "expiresAt": null,
    "reason": "manual_adjustment"
  }'
For more details, see Update bonus.

Delete a bonus

Delete removes a bonus grant that has not been consumed.
const result = await priceos.bonuses.delete("9e9be7e5-55d2-4b44-93af-c3687f4b8af5");
curl -X DELETE "https://api.priceos.com/v1/bonuses/9e9be7e5-55d2-4b44-93af-c3687f4b8af5" \
  -H "x-api-key: PRICEOS_API_KEY"
For more details, see Delete bonus.