Outdoorsy Referrals API

The Referrals API from Outdoorsy — 4 operation(s) for referrals.

OpenAPI Specification

outdoorsy-referrals-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The Outdoorsy API (or simply "API") is organized around REST. It uses

    predictable, resource-oriented URLs and implements standard HTTP response

    codes, verbs, authentication mechanisms, and a variety of request encodings.


    ## Versioning


    The API implements semantic versioning.'
  title: Outdoorsy API Documentation Referrals API
  version: 0.0.1
servers:
- url: /v0
security:
- Bearer:
  - '[]'
- API-Key:
  - '[]'
tags:
- name: Referrals
paths:
  /referrals/refer:
    post:
      tags:
      - Referrals
      summary: Send referral communications to a list of friends.
      operationId: referFriendsRequest
      parameters:
      - x-go-name: RefereeType
        name: referee_type
        in: query
        schema:
          type: string
      - $ref: '#/components/schemas/Referees'
        x-go-name: Referees
        name: referees
        in: query
      - x-go-name: ReferralType
        name: referral_type
        in: query
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/referFriendsResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        default:
          $ref: '#/components/responses/genericError'
  /referrals/stats:
    get:
      summary: Send referral communications to a list of friends.
      operationId: Referrals
      responses:
        '200':
          $ref: '#/components/responses/getReferralCreditStatsResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        default:
          $ref: '#/components/responses/genericError'
      tags:
      - Referrals
  /referrals/{referral_code}/display-data:
    get:
      tags:
      - Referrals
      summary: Send referral communications to a list of friends.
      operationId: GetReferrerInfoRequest
      parameters:
      - x-go-name: ReferralCode
        name: referral_code
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/GetReferrerInfoResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        default:
          $ref: '#/components/responses/genericError'
  /referrals/{referral_code}/eligibility:
    get:
      summary: Check eligibility of the referee.
      operationId: CheckEligibilityResponse
      responses:
        '200':
          $ref: '#/components/responses/CheckEligibilityResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        default:
          $ref: '#/components/responses/genericError'
      tags:
      - Referrals
      requestBody:
        content:
          application/json:
            schema:
              type: boolean
components:
  responses:
    badRequestError:
      description: Invalid input or state means you're bad
      headers:
        Error:
          schema:
            type: string
    unauthorizedError:
      description: Unauthorized error
    genericError:
      description: An unknown, unexpected error.
  schemas:
    Referee:
      type: object
      properties:
        email:
          type:
          - string
          - 'null'
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        phone:
          type:
          - string
          - 'null'
      x-go-package: github.com/outdoorsy/api/internal/referrals
    Referees:
      type: array
      items:
        $ref: '#/components/schemas/Referee'
      x-go-package: github.com/outdoorsy/api/internal/referrals
  securitySchemes:
    API-Key:
      type: apiKey
      name: API-Key
      in: header
    Bearer:
      type: apiKey
      name: Authorization
      in: header