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

# Create a rewards program



## OpenAPI

````yaml /openapi.json post /businesses/{id}/rewards_program
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /businesses/{id}/rewards_program:
    post:
      tags:
        - Rewards programs
      summary: Create a rewards program
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the business
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                points_earned_per_dollar_spent:
                  type: integer
                  description: The number of points earned per dollar spent
                point_redemption_value:
                  type: string
                  description: The value of a single point in dollars
                points_for_member_class_attendance:
                  type: integer
                  description: The number of points earned for attending a class
                points_for_referring_new_student:
                  type: integer
                  description: The number of points earned for referring a new student
                points_for_referring_new_student_that_signs_up:
                  type: integer
                  description: >-
                    The number of points earned for referring a new student that
                    signs up
                points_for_every_ten_classes_non_member:
                  type: integer
                  description: The number of points earned for every ten classes attended
                points_for_first_visit_in_three_months:
                  type: integer
                  description: The number of points earned for first visit in three months
      responses:
        '200':
          description: The created `RewardsProgram` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardsProgram'
components:
  schemas:
    RewardsProgram:
      type: object
      properties:
        id:
          type: string
          description: The ID of the rewards program
        name:
          type: string
          nullable: true
          description: The name of the rewards program
        points_earned_per_dollar_spent:
          type: integer
          description: The number of points earned per dollar spent
        point_redemption_value:
          anyOf:
            - type: string
            - type: number
          description: The value of a single point in dollars
        points_for_member_class_attendance:
          type: integer
          description: The number of points earned for attending a class
        points_for_referring_new_student:
          type: integer
          description: The number of points earned for referring a new student
        points_for_referring_new_student_that_signs_up:
          type: integer
          description: >-
            The number of points earned for referring a new student that signs
            up
        points_for_every_ten_classes_non_member:
          type: integer
          description: The number of points earned for every ten classes attended
        points_for_first_visit_in_three_months:
          type: integer
          description: The number of points earned for first visit in three months
        program_image_url:
          type: string
          nullable: true
          description: The URL of the program image
        earning_cycle:
          type: string
          nullable: true
          description: The earning cycle of the program
        published:
          type: boolean
          description: Whether the program is published
        status:
          type: string
          enum:
            - draft
            - backfilling
            - published
          description: The status of the program
      required:
        - id
        - name
        - points_earned_per_dollar_spent
        - point_redemption_value
        - points_for_member_class_attendance
        - points_for_referring_new_student
        - points_for_referring_new_student_that_signs_up
        - points_for_every_ten_classes_non_member
        - points_for_first_visit_in_three_months
        - program_image_url
        - earning_cycle
        - published
        - status
      title: The Rewards Program object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````