openapi: 3.0.0
info:
  title: Offerings Model | REST API v1 Reference
  version: '1.0'
  description: RevenueCat API v1 schema reference for Offerings Model.
servers:
  - url: https://api.revenuecat.com/v1
security:
  - BearerAuth: []
tags:
  - name: offerings_model
    x-displayName: Offerings Model
    description: >
      Part of the [REST API v1 Reference](/docs/api-v1).


      <SchemaDefinition schemaRef="#/components/schemas/Offerings"
      exampleRef="#/components/examples/Offerings" showReadOnly={true}
      showWriteOnly={true} />
  - name: Endpoint Reference
    x-traitTag: true
    description: >
      All API v1 resources, one page each. General concepts (authentication,
      request format, URL parameters) live on the [API v1
      overview](/docs/api-v1).


      - [Customer Info Model](/docs/api-v1/customer-info-model) — full schema
      reference

      - [Customers](/docs/api-v1/customers) — 4 endpoints

      - [Entitlements](/docs/api-v1/entitlements) — 2 endpoints

      - [Offerings](/docs/api-v1/offerings) — 3 endpoints

      - [Offerings Model](/docs/api-v1/offerings-model) — full schema reference

      - [Transactions](/docs/api-v1/transactions) — 6 endpoints
paths: {}
components:
  schemas:
    Offerings:
      example:
        value: &ref_0
          current_offering_id: default
          offerings:
            - description: The default offering
              identifier: default
              packages:
                - identifier: $rc_monthly
                  platform_product_identifier: monthly_free_trial
                - identifier: consumable
                  platform_product_identifier: consumable1
                - identifier: $rc_annual
                  platform_product_identifier: yearly_free_trial
            - description: The sale offeringg
              identifier: sale_offering
              packages:
                - identifier: $rc_monthly
                  platform_product_identifier: monthly_free_trial_sale
                - identifier: consumable
                  platform_product_identifier: consumable1_sale
                - identifier: $rc_annual
                  platform_product_identifier: yearly_free_trial_sale
      type: object
      description: Your app's [Offerings and Packages](/getting-started/entitlements).
      properties:
        current_offering_id:
          type: string
          description: >-
            The identifier of the current Offering for this Customer.
            [Targeting](/docs/tools/targeting), [Offering
            overrides](/docs/api-v1/offerings#tag/offerings/operation/override-offering),
            and [Experiments](/docs/tools/experiments-v1) affect this identifier
            depending on the App User ID.
          example: default
        offerings:
          type: array
          description: A list of available Offerings.
          items:
            type: object
            description: An Offering.
            properties:
              description:
                type: string
                description: The Offering's description.
                example: The default offering
              identifier:
                type: string
                description: The Offering's identifier.
                example: default
              packages:
                type: array
                description: The Packages of this Offering.
                items:
                  type: object
                  description: The Offering's packages.
                  properties:
                    identifier:
                      type: string
                      description: >-
                        The package's identifier. If you used one of
                        RevenueCat's default identifiers, it will be prefixed by
                        `$rc_`.
                      example: $rc_monthly
                    platform_product_identifier:
                      type: string
                      example: monthly_free_trial
                      description: >-
                        The identifier of the product in the store. This should
                        be used to fetch the product from Apple, Google, Amazon,
                        or Stripe depending on the platform. This field will be
                        populated only for the current app based on the API key
                        used and the `X-Platform` header.
  examples:
    Offerings:
      value: *ref_0
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
