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

# Show a public peer-to-peer program page

> Returns the public peer-to-peer campaign page for a client and program slug. The endpoint only returns programs whose settings mark them as `peer_to_peer`, then builds recipient cards, donation totals, checkout setting ids, and public display flags from program settings. Public checkout clients use the response to render the campaign listing and decide whether recipients can still accept donations.



## OpenAPI

````yaml get /frontend/public/peer-to-peer/{clientSlugOrId}/{programSlug}
openapi: 3.0.0
info:
  title: Gratona API
  description: >-
    REST API for the Gratona fundraising platform, including donor, donation,
    sponsorship, program, event, and integration workflows. Endpoints are
    organized by tag. Most endpoints require either a Passport bearer token or
    an issued API key — see the Security Schemes section.
  contact:
    name: Gratona Engineering
    url: https://gratona.com
    email: devs@gratona.com
  version: 1.0.0
servers:
  - url: https://api.gratona.com/v1
    description: Server Version 1.0.0
security: []
tags:
  - name: Auth
    description: >-
      Login, signup, logout, password reset, and email verification for admin
      users and donors.
  - name: Donors
    description: >-
      Donor records: CRUD, profile fields, household linkage, search, filters,
      merge, and duplicate detection.
  - name: Donations
    description: >-
      Individual donation records, recurring commitments, soft credits, refunds,
      designations, and exports.
  - name: Sponsorships
    description: >-
      Donor-to-entity sponsorship relationships, lifecycle transitions, and
      sponsorship-specific filters.
  - name: Entities
    description: >-
      Recipient records (children, families, projects, animals, etc.), their
      status, and entity-level fields.
  - name: Programs
    description: >-
      Program / campaign configuration: hierarchy, settings, and program-level
      metadata.
  - name: Forms
    description: >-
      Custom form builder (HysForm), form fields, standardized donor fields, and
      field migrations.
  - name: Trips
    description: >-
      Mission-trip management: trips, participants, budgets, tasks,
      e-signatures, fundraising milestones, and background checks.
  - name: Communications
    description: >-
      Email templates, SMS, newsletters, donor email manager, and per-donor
      notes.
  - name: Payments
    description: >-
      Payment-gateway management (Stripe, PayPal, Flutterwave, QuickBooks).
      Excludes inbound webhooks — see the Webhooks tag.
  - name: Reports
    description: Dashboards, analytics, scheduled reports, and exports.
  - name: Admin
    description: >-
      Client-account administration: users, groups/permissions, settings,
      integrations, and account lifecycle.
  - name: Donor Portal
    description: >-
      Endpoints consumed by the donor-facing portal (donor login, dashboard,
      donation history, messages).
  - name: Recipient Portal
    description: Endpoints consumed by the recipient-facing portal.
  - name: Public
    description: >-
      Unauthenticated public endpoints: donor signup, public trip pages,
      peer-to-peer campaigns, public checkout.
  - name: Webhooks
    description: >-
      Inbound webhooks from third parties (Stripe, PayPal, Flutterwave, Checkr,
      DropboxSign). Annotated minimally for reference; payload shapes are owned
      by the upstream provider.
  - name: Client
    description: Client
  - name: Email Settings
    description: Email Settings
  - name: Admin Dashboard
    description: Admin Dashboard
  - name: Historical Archived Updates
    description: Historical Archived Updates
  - name: Team & access
    description: Team & access
  - name: Files
    description: Files
  - name: Wrapped
    description: Wrapped
  - name: Donor SignUp
    description: Donor SignUp
  - name: Frontend
    description: Frontend
  - name: User
    description: User
paths:
  /frontend/public/peer-to-peer/{clientSlugOrId}/{programSlug}:
    get:
      tags:
        - Public
      summary: Show a public peer-to-peer program page
      description: >-
        Returns the public peer-to-peer campaign page for a client and program
        slug. The endpoint only returns programs whose settings mark them as
        `peer_to_peer`, then builds recipient cards, donation totals, checkout
        setting ids, and public display flags from program settings. Public
        checkout clients use the response to render the campaign listing and
        decide whether recipients can still accept donations.
      operationId: showPublicPeerToPeerProgram
      parameters:
        - name: clientSlugOrId
          in: path
          description: >-
            Organization identifier from the public URL. The controller accepts
            a numeric client id or a slug generated from the client organization
            name and uses it to scope the program lookup.
          required: true
          schema:
            type: string
          example: acme-foundation
        - name: programSlug
          in: path
          description: >-
            Peer-to-peer program slug in `name-id` format. The controller
            extracts the trailing numeric program id and verifies the program
            belongs to the resolved client and has `program_type` set to
            `peer_to_peer`.
          required: true
          schema:
            type: string
          example: sponsor-a-student-42
      responses:
        '200':
          description: Public peer-to-peer program data.
          content:
            application/json:
              schema:
                required:
                  - id
                  - client_id
                  - name
                  - slug
                  - organization
                  - recipients
                properties:
                  id:
                    description: Program id extracted from the route slug.
                    type: integer
                    example: 42
                  client_id:
                    description: Owning client id.
                    type: integer
                    example: 207
                  name:
                    description: Program display name.
                    type: string
                    example: Sponsor a Student
                  slug:
                    description: >-
                      Canonical `name-id` slug generated from the program name
                      and id.
                    type: string
                    example: sponsor-a-student-42
                  description:
                    description: Program info text from program settings.
                    type: string
                    example: Help students reach their fundraising goals.
                  cover_image_url:
                    description: >-
                      Public campaign image URL from the program placeholder
                      setting.
                    type: string
                    example: https://s3-us-west-1.amazonaws.com/hys/banner.jpg
                    nullable: true
                  donation_target:
                    description: >-
                      Overall campaign donation target from program settings
                      when configured.
                    type: number
                    format: float
                    example: 50000
                    nullable: true
                  total_raised:
                    description: >-
                      Sum of donations to visible recipients. Null when settings
                      hide donation amounts.
                    type: number
                    format: float
                    example: 12450
                    nullable: true
                  progress_percent:
                    description: >-
                      Campaign progress percentage when a positive target and
                      visible donation amounts are available.
                    type: number
                    format: float
                    example: 24.9
                    nullable: true
                  recipient_count:
                    description: >-
                      Count of visible recipients returned in the `recipients`
                      array.
                    type: integer
                    example: 18
                  checkout_setting_id:
                    description: Program setting id used by checkout for this campaign.
                    type: integer
                    example: 901
                    nullable: true
                  organization:
                    properties:
                      id:
                        type: integer
                        example: 207
                      name:
                        type: string
                        example: Acme Foundation
                    type: object
                  organization_name:
                    description: Organization name duplicated for frontend compatibility.
                    type: string
                    example: Acme Foundation
                  show_donation_amounts:
                    description: Whether public responses may show raised amounts.
                    type: boolean
                    example: true
                  show_donor_names:
                    description: How donor names are displayed on recipient profiles.
                    type: string
                    enum:
                      - full
                      - first_initial
                      - anonymous
                    example: full
                  allow_recurring_donations:
                    description: >-
                      Whether checkout may offer recurring gifts for this
                      peer-to-peer campaign.
                    type: boolean
                    example: true
                  completed_accept_donations:
                    description: >-
                      Whether recipients that have met their target can continue
                      accepting donations.
                    type: boolean
                    example: true
                  login_box:
                    description: >-
                      Legacy frontend flag controlling donor login UI
                      visibility.
                    type: string
                    enum:
                      - '0'
                      - '1'
                    example: '1'
                  accepts_donations:
                    description: >-
                      True when at least one visible recipient can receive
                      donations.
                    type: boolean
                    example: true
                  recipients:
                    description: >-
                      Visible recipient cards built from entity records, profile
                      uploads, and donation totals.
                    type: array
                    items:
                      properties:
                        id:
                          type: integer
                          example: 501
                        entity_id:
                          type: integer
                          example: 501
                        name:
                          type: string
                          example: Jane Student
                        slug:
                          type: string
                          example: jane-student-501
                        avatar_initial:
                          type: string
                          example: J
                          nullable: true
                        bio:
                          type: string
                          example: Jane is raising support for school fees.
                          nullable: true
                        donation_target:
                          type: number
                          format: float
                          example: 1200
                          nullable: true
                        total_raised:
                          type: number
                          format: float
                          example: 325
                          nullable: true
                        progress_percent:
                          type: number
                          format: float
                          example: 27.08
                          nullable: true
                        accepts_donations:
                          type: boolean
                          example: true
                        photo_url:
                          type: string
                          example: https://s3-us-west-1.amazonaws.com/hys/thumb.jpg
                          nullable: true
                        is_featured:
                          type: boolean
                          example: false
                      type: object
                  settings:
                    description: >-
                      Public subset of program settings used by the checkout and
                      public campaign UI.
                    type: object
                type: object
        '404':
          description: Organization or peer-to-peer program was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      security: []
components:
  schemas:
    NotFoundResponse:
      title: NotFoundResponse
      description: >-
        Returned with HTTP 404 when a resource lookup misses (typically because
        the id doesn't exist OR is scoped to a different `client_id`). Note:
        many endpoints intentionally collapse 'not found' and 'forbidden' into a
        single 404 to avoid leaking which records exist in another tenant.
      required:
        - message
      properties:
        message:
          description: >-
            Human-readable message. Often a more specific string like `Donor not
            found` or `Trip not found`.
          type: string
          example: Not Found
        status:
          type: string
          example: error
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.