> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priceos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Bonuses

> Manage bonuses via the PriceOS web app or our API

## List bonuses

<Tabs>
  <Tab title="API">
    <CodeGroup>
      ```ts TypeScript theme={null}
      const { bonuses } = await priceos.bonuses.list({
        customerId: "customer_123",
        featureKey: "api_calls",
      });
      ```

      ```bash cURL theme={null}
      curl -X GET "https://api.priceos.com/v1/bonuses?customerId=customer_123&featureKey=api_calls" \
        -H "x-api-key: PRICEOS_API_KEY"
      ```
    </CodeGroup>

    For more details, see [List bonuses](/api-reference/endpoint/bonuses-list).
  </Tab>

  <Tab title="Web App">
    You can view a customer's bonuses in the customer deteails page.

    <img src="https://mintcdn.com/priceos/ajKnnXzH4aBvtSvO/images/viewingBonuses.png?fit=max&auto=format&n=ajKnnXzH4aBvtSvO&q=85&s=5af8e8c022e24cbb857b65f54ff8b930" alt="Viewing customer bonuses in customer details page in PriceOS" width="939" height="388" data-path="images/viewingBonuses.png" />
  </Tab>
</Tabs>

***

## Update a bonus

<Tabs>
  <Tab title="API">
    <CodeGroup>
      ```ts TypeScript theme={null}
      const result = await priceos.bonuses.update({
        bonusId: "9e9be7e5-55d2-4b44-93af-c3687f4b8af5",
        amount: 150,
        expiresAt: null, // clear expiration
        reason: "manual_adjustment",
      });
      ```

      ```bash cURL theme={null}
      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"
        }'
      ```
    </CodeGroup>

    For more details, see [Update bonus](/api-reference/endpoint/bonuses-update).
  </Tab>

  <Tab title="Web App">
    You can update a customer's bonus in the customer deteails page by clicking the <b>More menu (...)</b> next to the bonus.

    <img src="https://mintcdn.com/priceos/ajKnnXzH4aBvtSvO/images/edittingCustomerBonuses.png?fit=max&auto=format&n=ajKnnXzH4aBvtSvO&q=85&s=bfa1016fc15616f3d66046d5acdceebb" alt="Viewing customer bonuses in customer details page in PriceOS" width="940" height="394" data-path="images/edittingCustomerBonuses.png" />
  </Tab>
</Tabs>

***

## Delete a bonus

Delete removes a bonus grant that has not been consumed.

<Tabs>
  <Tab title="API">
    <CodeGroup>
      ```ts TypeScript theme={null}
      const result = await priceos.bonuses.delete("9e9be7e5-55d2-4b44-93af-c3687f4b8af5");
      ```

      ```bash cURL theme={null}
      curl -X DELETE "https://api.priceos.com/v1/bonuses/9e9be7e5-55d2-4b44-93af-c3687f4b8af5" \
        -H "x-api-key: PRICEOS_API_KEY"
      ```
    </CodeGroup>

    For more details, see [Delete bonus](/api-reference/endpoint/bonuses-delete).
  </Tab>

  <Tab title="Web App">
    You can delete a customer's bonus in the customer deteails page by clicking the <b>More menu (...)</b> next to the bonus.

    <img src="https://mintcdn.com/priceos/ajKnnXzH4aBvtSvO/images/deletingCustomerBonuses.png?fit=max&auto=format&n=ajKnnXzH4aBvtSvO&q=85&s=d85f1c1fb8c6a93875e73acac61f642d" alt="Viewing customer bonuses in customer details page in PriceOS" width="939" height="395" data-path="images/deletingCustomerBonuses.png" />
  </Tab>
</Tabs>
