> ## 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.

# List Bonuses

> List bonuses for a customer, optionally filtered by feature key.



## OpenAPI

````yaml GET /v1/bonuses
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/bonuses:
    get:
      summary: List bonuses
      description: List bonuses for a customer, optionally filtered by feature key.
      parameters:
        - schema:
            type: string
            description: Internal customer ID.
          required: true
          description: Internal customer ID.
          name: customerId
          in: query
        - schema:
            type:
              - string
              - 'null'
            description: Optional feature key to filter bonuses.
          required: false
          description: Optional feature key to filter bonuses.
          name: featureKey
          in: query
        - schema:
            type: string
            description: API key from your PriceOS dashboard.
          required: true
          description: API key from your PriceOS dashboard.
          name: x-api-key
          in: header
      responses:
        '200':
          description: Bonus list
          content:
            application/json:
              schema:
                type: object
                properties:
                  bonuses:
                    type: array
                    items:
                      type: object
                      properties:
                        bonusId:
                          type: string
                          format: uuid
                          description: Bonus ID.
                        featureKey:
                          type: string
                          description: Feature key.
                        amount:
                          type: number
                          description: Bonus amount.
                        remainingAmount:
                          type: number
                          description: Remaining bonus amount.
                        expiresAt:
                          type:
                            - integer
                            - 'null'
                          description: Unix timestamp (ms) when the bonus expires.
                        reason:
                          type:
                            - string
                            - 'null'
                          description: Bonus reason.
                        metadata:
                          type: object
                          additionalProperties:
                            type: string
                          description: Bonus metadata.
                        createdAt:
                          type: integer
                          description: Unix timestamp (ms) when the bonus was created.
                        updatedAt:
                          type: integer
                          description: Unix timestamp (ms) when the bonus was last updated.
                      required:
                        - bonusId
                        - featureKey
                        - amount
                        - remainingAmount
                        - createdAt
                        - updatedAt
                    description: Bonuses.
                required:
                  - bonuses
                description: Bonus list.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
      x-codeSamples:
        - lang: typescript
          label: Node.js
          source: >-
            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",
            });
        - lang: bash
          label: cURL
          source: >-
            curl -X GET
            "https://api.priceos.com/v1/bonuses?customerId=customer_123&featureKey=api_calls"
            \
              -H "x-api-key: PRICEOS_API_KEY"

````