{
  "openapi": "3.1.0",
  "info": {
    "title": "Refer Me Friend Offers API",
    "version": "1.0.0",
    "description": "Public, read-only bilingual catalog of active referral offers. Use claim_url to follow a referral and referral_code when the provider requests a code."
  },
  "servers": [
    {
      "url": "https://refermefriend.com"
    }
  ],
  "paths": {
    "/api/v1/offers.json": {
      "get": {
        "operationId": "listReferralOffers",
        "summary": "List active referral offers",
        "description": "Returns English and French offer records. Provider terms and eligibility always control. Referral use may reward the site owner.",
        "responses": {
          "200": {
            "description": "Current bilingual offer catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": [
          "schema_version",
          "generated_on",
          "offers"
        ],
        "properties": {
          "schema_version": {
            "type": "string"
          },
          "generated_on": {
            "type": "string",
            "format": "date"
          },
          "offers": {
            "type": "object",
            "required": [
              "en",
              "fr"
            ],
            "properties": {
              "en": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Offer"
                }
              },
              "fr": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Offer"
                }
              }
            }
          }
        }
      },
      "Offer": {
        "type": "object",
        "required": [
          "id",
          "language",
          "brand",
          "description",
          "eligible_region",
          "offer_page"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "bonus": {
            "type": [
              "string",
              "null"
            ]
          },
          "referral_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "subcategory": {
            "type": [
              "string",
              "null"
            ]
          },
          "eligible_region": {
            "type": "string"
          },
          "offer_page": {
            "type": "string",
            "format": "uri"
          },
          "markdown_page": {
            "type": "string",
            "format": "uri"
          },
          "claim_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "provider_terms_control": {
            "type": "boolean"
          }
        }
      }
    }
  }
}