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

# Get Bonus

> Get bonus info by id or external key



## OpenAPI

````yaml GET /v1alpha1/bonuses/{id_or_key}
openapi: 3.1.0
info:
  title: ToffeePay API
  description: Public API for game partners
  version: 0.1.1
servers:
  - url: https://api.toffeepay.com
    description: Production
  - url: https://api.sandbox.toffeepay.com
    description: Sandbox
security:
  - BearerAuth: []
paths:
  /v1alpha1/bonuses/{id_or_key}:
    get:
      summary: GetBonus
      description: Get bonus info by id or external key
      operationId: BonusService_GetBonus
      parameters:
        - name: id_or_key
          in: path
          required: true
          schema:
            type: string
            title: id_or_key
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/wallet.v1alpha1.Bonus'
                title: bonus
components:
  schemas:
    wallet.v1alpha1.Bonus:
      type: object
      properties:
        id:
          type: string
          title: id
        key:
          type:
            - string
            - 'null'
          title: key
        account_id:
          type: string
          title: account_id
        amount:
          type: integer
          title: amount
          minimum: 0
          format: int32
        currency:
          type: string
          title: currency
          enum:
            - USD
            - GBP
            - EUR
        metadata:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Struct'
            - type: 'null'
          title: metadata
        created_at:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
      title: Bonus
      required:
        - id
        - account_id
        - amount
        - currency
        - created_at
      additionalProperties: false
    google.protobuf.Struct:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/google.protobuf.Value'
      description: |-
        `Struct` represents a structured data value, consisting of fields
         which map to dynamically typed values. In some languages, `Struct`
         might be supported by a native representation. For example, in
         scripting languages like JS a struct is represented as an
         object. The details of that representation are described together
         with the proto support for the language.

         The JSON representation for `Struct` is JSON object.
    google.protobuf.Timestamp:
      type: string
      format: date-time
    google.protobuf.Value:
      oneOf:
        - type: 'null'
        - type: number
        - type: string
        - type: boolean
        - type: array
        - type: object
          additionalProperties: true
      description: |-
        `Value` represents a dynamically typed value which can be either
         null, a number, a string, a boolean, a recursive struct value, or a
         list of values. A producer of value is expected to set one of these
         variants. Absence of any variant indicates an error.

         The JSON representation for `Value` is JSON value.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````