info:
  title: Developer API
  version: 2.0.0
tags:
  - name: App
    description: Operations about apps.
  - name: Charts & Metrics
    description: Operations about chart metrics.
  - name: Customer
    description: Operations about customers.
  - name: Entitlement
    description: Operations about entitlements.
  - name: Offering
    description: Operations about offerings.
  - name: Package
    description: Operations about packages.
  - name: Product
    description: Operations about products.
  - name: Purchase
    description: Operations about purchases.
  - name: Subscription
    description: Operations about subscriptions.
  - name: Invoice
    description: Operations about invoices.
  - name: Paywall
    description: Operations about paywalls.
  - name: Project
    description: Operations about projects.
  - name: Subscription Data Model
    x-modelReference: true
    description: >
      <SchemaDefinition schemaRef="#/components/schemas/Subscription"
      showReadOnly={true} showWriteOnly={true} />
  - name: Overview (v2)
    x-traitTag: true
    description: >-
      <div class="theme-admonition theme-admonition-info alert alert--info">
        <div class="heading">New to RevenueCat?</div>
        <div>Welcome! If you're adding subscriptions or other in-app purchases to your app, the RevenueCat SDK will handle most of the heavy-lifting without the need to interact with this API directly. See our <a href="/docs/getting-started/quickstart">Quickstart</a> for more information on getting started with RevenueCat.</div>
      </div>


      <div class="theme-admonition theme-admonition-info alert alert--info">
        <div class="heading">API v2 under development</div>
        <div>
          REST API v2 is currently under development and does not yet cover all use cases from API v1. For those missing use cases, please use v1 in the meantime.
        </div>
      </div>


      ## About RevenueCat’s REST API


      RevenueCat provides a REST API for developers to perform customer and
      transaction related actions from their own server.


      Most of this API is geared toward client usage via RevenueCat’s SDK, but
      there are various endpoints that can be used for refunding purchases,
      granting promotional entitlements, and other sensitive actions that can
      only be done via a Secret API key from your server.


      ## Should I use this REST API or the RevenueCat SDK?


      If you’re adding subscriptions or other in-app purchases to your app for
      the first time or if you don’t have a backend that stores your user’s
      receipts, you’re probably looking to implement the [RevenueCat
      SDK](/docs/getting-started/installation).


      If you want to start migrating your existing users to RevenueCat and you
      have your user’s receipts stored on your own server, or you want to check
      subscription status of your users from your own server, the REST API is a
      great solution.


      ## Authentication


      Authentication for the RevenueCat REST API is achieved by setting the
      `Authorization` header with a valid API key. You'll find two types of API
      keys in your RevenueCat dashboard: _public_ and _secret_.


      Certain endpoints require secret keys, which should be kept out of any
      publicly accessible areas such as GitHub, client-side code, and so forth.
      See our [Authentication guide](/docs/welcome/authentication) for more
      information.


      ```text title="Authorization Header"

      Authorization: Bearer YOUR_REVENUECAT_API_KEY

      ```


      <div class="theme-admonition theme-admonition-info alert alert--warning">
        <div class="heading">
          Authorization type `Bearer` required in header
        </div>
        <div>
          he RevenueCat REST API v2 requires stating the authorization type `Bearer` in the `Authorization` header before the API key in accordance with [RFC 7235](https://datatracker.ietf.org/doc/html/rfc7235). This is different to the v1 API which allowed passing just the API key as the `Authorization` header.
        </div>
      </div>


      <div class="theme-admonition theme-admonition-info alert alert--warning">
        <div class="heading">
          API v1 keys will not work with REST API v2
        </div>
        <div>
          In order to utilize the RevenueCat API v2, please create new v2 secret keys and define your permissions.
        </div>
      </div>


      ## API v2 Permissions


      You can create a new secret API key in your project settings page > API
      keys. Select _+ New_.


      ![](https://www.revenuecat.com/docs/images/c640edd-image.png)


      Give it a name, select `V2` as the version, and set your permissions. Be
      sure to select _Generate_ at the top right corner.


      ![](https://www.revenuecat.com/docs/images/842f5ae-image.png)


      Each endpoint in this documentation will contain a description informing
      you which permissions are required.


      ## Request Payload


      The body of the `POST` requests should be encoded in JSON and have the
      'Content-Type' header set to 'application/json'.


      ```text title="Content-Type Header"

      Content-Type: application/json

      ```


      ```json title="Sample Body"

      {
        "app_user_id": "user-1456",
        "fetch_token": "MQABC...EFH1234="
      }

      ```


      ## Params


      <div class="theme-admonition theme-admonition-info alert alert--warning">
        <div class="heading">Encode your URL params</div>
        <div>For URL params, such as the `app_user_id`, make sure you URL encode them before using them.</div>
      </div>
  - name: Pagination
    x-traitTag: true
    description: >-
      Top-level API resources have support for bulk fetches via "list" API
      methods. For instance, you can list products, list entitlements, and list
      offerings. These list API methods share a common structure, taking at
      least these two parameters: `limit` and `starting_after`.


      When a response or a field contains multiple entities of the same type, it
      returns a `list` object of the following structure:


      ```json title="JSON"

      {
        "object": "list",
        "items": [{}],
        "next_page": "LIST_BASE_URL?starting_after=LAST_ID",
        "url": "LIST_BASE_URL"
      }

      ```


      Where…


      - `url` is the full path base URL of the list endpoint (i.e., if you make
      a request to this endpoint, you will get the first page), e.g.
      `/v2/projects/{project_id}/products`

      - `next_page` is the URL for the next page, if there is one. If there is
      no next page, the `next_page` field will not be present. Example:
      `/v2/projects/{project_id}/products?starting_after={last_id}`

      - `items` is an array of the entries of the list.


      The `starting_after` query parameter of list endpoints accepts the ID of
      the first list item that will not be part of the list (in other words, the
      ID of the last item of the previous page).


      At the moment we only support forward pagination.


      ## Parameters


      `limit` _optional, default is 20_


      A limit on the number of objects to be returned.


      `starting_after` _optional_


      A cursor for use in pagination. `starting_after` is an object ID that
      defines your place in the list. For instance, if you make a list request
      and receive 20 objects, ending with foo, your subsequent call can include
      `starting_after=foo` in order to fetch the next page of the list.
  - name: Rate Limit
    x-traitTag: true
    description: >
      We will return the following headers on all successful requests:


      * `RevenueCat-Rate-Limit-Current-Usage`: the number of executed requests
      for the current rate limiting period, including the current request. The
      rate limiting period is one minute.

      * `RevenueCat-Rate-Limit-Current-Limit`: the limit in requests per minute
      for this endpoint


      If you reach the rate limit, as indicated by a 429 error code, we will
      also include the following header:


      * `Retry-After`: the number of seconds to wait until you can retry this
      request.


      Below is an example of the response body that will be sent when the rate
      limit is reached. The value of the `backoff_ms` field corresponds to the
      `Retry-After`` header but specified in milliseconds.


      ```

      {
        "type": "rate_limit_error",
        "message": "Rate limit exceeded",
        "retryable": true,
        "doc_url": "https://errors.rev.cat/rate-limit-error",
        "backoff_ms": 1000
      }

      ```
  - name: Expandables
    x-traitTag: true
    description: >
      Expandables allow you to retrieve related data along with the request
      without making additional requests. Fields in the REST API will allow you
      to request additional information as an expanded response by using the
      `expand` query parameter.


      For example, a `product` object will have an associated `app_id` field.
      This `app_id` field can be expanded in the same request with the `expand`
      query parameter and will include an `app` object in the response.


      ### Without `expand` query param


      ```json title="GET /products/prod1a2b3c4d5"

      {
        "object": "product",
        "id": "prod1a2b3c4d5e",
        "store_identifier": "rc_1w_199",
        "type": "subscription",
        "subscription": {
          "duration": "P1M",
          "grace_period_duration": "P3D",
          "trial_duration": "P1W"
        },
        "created_at": 1658399423658,
        "app_id": "app1a2b3c4"
      }

      ```


      ### With `expand` query param:


      ```json title="GET /products/prod1a2b3c4d5?expand=app"

      {
        "object": "product",
        "id": "prod1a2b3c4d5e",
        "store_identifier": "rc_1w_199",
        "type": "subscription",
        "subscription": {
          "duration": "P1M",
          "grace_period_duration": "P3D",
          "trial_duration": "P1W"
        },
        "created_at": 1658399423658,
        "app_id": "app1a2b3c4",
        "app": {
          "id": "app1a2b3c4",
          "name": "string",
          "created_at": 1658399423658,
          "type": "amazon",
          "project_id": "proj1a2b3c4"
        }
      }

      ```


      As you can see from above, the `app_id` field remains the same, but the
      response contains an additional `app` object.


      Fields that can be expanded into objects are indicated in the endpoint
      documentation under **Query Params** and will list accepted values.

      Also, the required permissions to be defined in the API key are listed
      there.
  - name: Error Handling
    x-traitTag: true
    description: >-
      RevenueCat uses [standard HTTP status
      codes](#tag/Error-Handling/Error-Codes) to indicate the success or failure
      of an API request. Codes in the `2XX` range indicate the request was
      successful. `4XX` codes indicate an error caused by the client. `5XX`
      codes indicate an error in RevenueCat servers.


      Successful modifications return the modified entity. Errors return the
      following fields:


      ```json title="Sample Error Response"

      {
        "type": "parameter_error",
        "param": "customer_id",
        "message": "id is too long",
        "retryable": false,
        "doc_url": "https://errors.rev.cat/parameter-error"
      }

      ```


      For more information on the `type` field and how to resolve these errors,
      please visit our [Error Types](#tag/Error-Handling/Error-Types)
      documentation.


      ## Error Codes


      | Code | Name                  |
      Description                                                                                                                                                                                         
      |

      | :--- | :-------------------- |
      :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      |

      | 200  | OK                    | Processed as
      expected                                                                                                                                                                               
      |

      | 201  | Created               | Entity was
      created                                                                                                                                                                                  
      |

      | 202  | Accepted              | Request acknowledged, but cannot be
      processed in real time (for instance, async
      job)                                                                                                                
      |

      | 204  | No content            | The request was successful and there was
      no content that could be
      returned                                                                                                                          
      |

      | 400  | Bad Request           | Client
      error                                                                                                                                                                                        
      |

      | 401  | Unauthorized          | Not
      authenticated                                                                                                                                                                                   
      |

      | 403  | Forbidden             | Authorization
      failed                                                                                                                                                                                
      |

      | 404  | Not Found             | No resource was
      found                                                                                                                                                                               
      |

      | 409  | Conflict              | Uniqueness constraint
      violation                                                                                                                                                                     
      |

      | 418  | I'm a teapot          | RevenueCat refuses to brew
      coffee                                                                                                                                                                   
      |

      | 422  | Unprocessable entity  | The request was valid and the syntax
      correct, but we were unable to process the contained
      instructions.                                                                                             
      |

      | 423  | Locked                | The request conflicted with another
      ongoing
      request                                                                                                                                                 
      |

      | 429  | Too Many Requests     | Being [rate
      limited](#tag/Rate-Limit)                                                                                                                                                                
      |

      | 500  | Internal Server Error | The RevenueCat server ran into an
      unexpected problem – please check the [RevenueCat status
      page](https://status.revenuecat.com/) for any known outages and/or report
      the issue to RevenueCat support |

      | 502  | Bad Gateway           | Invalid response from an upstream
      server                                                                                                                                                            
      |

      | 503  | Service Unavailable   | There wasn’t a server to handle the
      request                                                                                                                                                         
      |

      | 504  | Gateway Timeout       | We could not get the response in time
      from the upstream
      server                                                                                                                                      
      |


      ## Error Types

      ### `authentication_error`


      Authentication is not valid for the given API key. Double check your API
      key.


      ### `authorization_error`


      The API key does not belong the project you specified. Double check that
      your API key is associated with the IDs you are passing.


      ### `invalid_request`


      This error can be due to several reasons:


      - `Content-Type: application/json` is missing in the request header for
      `POST`/`PUT`/`PATCH` requests

      - Using the incorrect HTTP method on a path (i.e: `GET
      …/entitlements/<entitlements_id>/actions/attach_products`)


      ### `parameter_error`


      The parameter provided is invalid. Please refer to the `message` field for
      more information.


      - IDs (e.g: `entitlement_id`, `project_id`, etc): 1 to 255 characters

      - `display_name`(applies to Entitlements): 1 to 1000 characters

      - `lookup_key`(applies to Entitlements): 1 to 200 characters


      ### `rate_limit_error`


      The request has hit the [rate limit](#tag/Rate-Limit) for this endpoint.
      Refer to the `backoff_ms` field to determine how many milliseconds to wait
      before making another request to the same endpoint.


      ### `resource_missing`


      The resource with the specific ID does not exist. Double check the IDs
      (e.g: product ID, entitlement ID, etc) you are passing into the endpoints.


      ### `resource_already_exists`


      The resource with the specific ID already exists. Use a different, unique
      value for ID and try again.


      ### `resource_locked_error`


      The resource is currently being modified by a concurrent request. Refer to
      the `backoff_ms` field to determine when to try again.


      ### `server_error`


      Request is not able to be processed due to an internal server error. Refer
      to the `backoff_ms` field to determine when to try again. Please report
      this to the RevenueCat team if you are encountering this issue.


      ### `store_error`


      There was a problem with the stores (e.g: Apple App Store, Google Play
      Store, etc). This typically occurs when the stores are unable to process
      the request. Refer to the `backoff_ms` field to determine when to try
      again.


      ### `unprocessable_entity_error`


      Request is not able to be processed. Please refer to the `message` field
      for more information.
  - name: Representation of Subscriptions
    x-traitTag: true
    description: >-
      In comparison to our [v1 REST API](/docs/api-v1#tag/customer_info_model),
      we have made changes to improve the organization and accessibility of your
      customers’ subscriptions. The data model used in the RevenueCat REST API
      v2 has several advantages. Firstly, it better abstracts differences
      between different app stores, making it easier for you to access your data
      without needing to understand the specificities and idiosyncrasies of each
      individual store. 


      Additionally, the REST API v2 subscription data model provides richer
      information regarding your subscription data and includes new fields such
      as:


      - `gives_access`: Rather than having to create your own logic to determine
      if a customer should have access, we will provide you with that
      information directly.

      - `auto_renewal_status`: Previously you would have to use
      `unsubscribe_detected_at`, `billing_issues_detected_at`, and other fields
      to determine the auto renewal status of the customer, now we include this
      information to take away the estimation work.

      - `status`: Gives you a quick and easy way to gather the status of the
      customer’s subscription to determine what state they are currently in.

      - `store_subscription_identifier`: Whereas the old data model was missing
      the store’s subscription identifier (aka the transaction ID directly from
      the stores), we have included this new field to help identify your
      customer’s subscription.

      - `total_revenue_in_usd`: You can easily determine how much a customer has
      spent for this subscription in USD and utilize it for your own bookkeeping
      purposes. This object also contains information such as gross, commission,
      tax, and proceeds to help you break down the customer’s revenue. 


      To view more details of fields we have included for the subscription
      object, check out the [model reference](#tag/Subscription-Data-Model). 


      Eventually we will also expose this sort of information in webhooks and
      customer event details to incorporate the new data model throughout
      RevenueCat.


      ## What constitutes a new subscription


      Different stores supported by RevenueCat have different logic to define
      what is a new subscription vs. a change to an existing subscription. To
      make it easier to handle subscriptions across different stores, the data
      model for the RevenueCat REST API v2 is now following a consistent
      definition of what continues the same subscription vs. a new one:


      - After a subscription has lapsed (e.g: after a billing retry or letting
      subscription expire after an unsubscribe), if a customer subscribes to the
      same product it will be considered a new subscription (this was previously
      treated differently on Apple App Store vs. Google Play Store)

      - If the product of a paid subscription is changed, the subscription to
      the new product will be considered a new subscription. An exception is
      product changes during a trial period, the post-trial subscription period
      to a different product will not be considered a new subscription, but a
      regular trial conversion

      - For family shared subscriptions:
        - Family shared subscriptions will be considered as a new subscription (albeit with no revenue)
        - If family sharing access is revoked and later re-enabled, this will be considered as a new subscription

      ### Diagrams for different cases


      #### Billing issue: unrecovered


      ![](/docs/images/api-v2/b39dda4-Billing_issue__unrecovered.png)



      #### Billing issue: recovered


      ![](/docs/images/api-v2/312e3fd-Billing_issue__recovered.png)



      #### Lapsed subscription


      ![](/docs/images/api-v2/dca8cda-Lapsed_subscription.png)



      #### Product changes: upgrade (no trial)


      ![](/docs/images/api-v2/1a8e689-Product_changes__upgrade_no_trial.png)



      #### Product changes: downgrade (no trial)


      ![](/docs/images/api-v2/ae7edfc-Product_changes__downgrade_no_trial.png)



      #### Product changes (with trial)


      ![](/docs/images/api-v2/a4e8115-Product_changes_with_trial.png)



      #### Subscription paused: Recovery


      ![](/docs/images/api-v2/4fa17e9-Subscription_paused__Recovery.png)



      #### Subscription paused: Billing issue, recovered


      ![](/docs/images/api-v2/a10133d-Subscription_paused__Billing_issue_recoverd.png)



      #### Subscription paused: Billing issue, unrecovered


      ![](/docs/images/api-v2/6fa24fb-Subscription_paused__Billing_issue_unrecovered.png)



      #### Family shared subscriptions


      ![](/docs/images/api-v2/1511106-Family_shared_subscriptions.png)



      #### Family shared subscriptions: regranted


      ![](/docs/images/api-v2/b3134c1-Family_shared_subscriptions__regranted.png)
paths:
  /projects/{project_id}/paywalls:
    post:
      summary: Create a paywall
      operationId: create-paywall
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - offering_id
              properties:
                offering_id:
                  description: |
                    The ID of the offering the paywall will be created for.
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: ofrng123456789a
              additionalProperties: false
      responses:
        '201':
          description: Success. The paywall was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paywall'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: |-
        Create a paywall for an offering of the project.
         This endpoint requires the following permission(s): <code>project_configuration:offerings:read_write</code>.
  /projects/{project_id}/apps/{app_id}/public_api_keys:
    get:
      summary: Get a list of the public API keys of an app
      operationId: list-app-public-api-keys
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiKeys'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read</code>.
  /projects:
    get:
      summary: Get a list of projects
      operationId: list-projects
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:projects:read
      x-release-status: public
      tags:
        - Project
      parameters:
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProjects'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:projects:read</code>.
  /projects/{project_id}/apps:
    get:
      summary: Get a list of apps
      operationId: list-apps
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApps'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read</code>.
    post:
      summary: Create an App
      operationId: create-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppCreate'
              additionalProperties: false
            examples:
              App Store:
                value:
                  name: My App Store App
                  type: app_store
                  app_store:
                    bundle_id: com.apple.Pages
                    shared_secret: 1234567890abcdef1234567890abcdef
                    subscription_private_key: >-
                      -----BEGIN EC PRIVATE KEY-----

                      MHQCAQEEIGAkwOF0qkGO19yJlIzQVcOg+HBfvLL4KDXDtL+MMHk2oAcGBSuBBAAK

                      oUQDQgAEhDP7RaX4c6qOHkE1nIWMr5C90ybtr87VRGFm4VsfWqG47NPN+/dHcfwJ

                      JPZGFgMcgvBc37AxQPPQjyXYjhhQDg==

                      -----END EC PRIVATE KEY-----
                    subscription_key_id: 6345942CC3
                    subscription_key_issuer: 5a049d62-1b9b-453c-b605-1988189d8129
              Play Store:
                value:
                  name: My Play Store App
                  type: play_store
                  play_store:
                    package_name: com.android.app
              Stripe:
                value:
                  name: My Stripe App
                  type: stripe
                  stripe:
                    stripe_account_id: acct_adcdef123456
              Amazon:
                value:
                  name: My Amazon App
                  type: amazon
                  amazon:
                    package_name: com.amazon.android.app
                    shared_secret: <Your Amazon Developer Identity Shared Key>
              Web Billing:
                value:
                  name: My RevenueCat App
                  type: rc_billing
                  rc_billing:
                    app_name: <Your app name>
                    default_currency: USD
              Roku:
                value:
                  name: My Roku App
                  type: roku
                  roku:
                    roku_api_key: <Your Roku Pay API Key goes here>
                    roku_channel_id: 123456
                    roku_channel_name: History Channel
      responses:
        '201':
          description: Success. The app was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read_write</code>.
  /projects/{project_id}/apps/{app_id}:
    get:
      summary: Get an app
      operationId: get-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read</code>.
    post:
      summary: Update an app
      operationId: update-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The name of the app
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: My App
                  nullable: false
                amazon:
                  description: >-
                    Amazon type details. Should only be used when type is
                    amazon.
                  type: object
                  nullable: false
                  properties:
                    package_name:
                      description: The package name of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: Your Amazon Developer Identity Shared Key
                      type: string
                      nullable: true
                app_store:
                  description: >-
                    App Store type details. Should only be used when type is
                    app_store.
                  type: object
                  nullable: false
                  properties:
                    bundle_id:
                      description: The bundle ID of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: The shared secret of the app
                      type: string
                      minLength: 32
                      maxLength: 32
                      nullable: true
                mac_app_store:
                  description: >-
                    Legacy Mac App Store type details. Should only be used when
                    type is mac_app_store.
                  type: object
                  nullable: false
                  properties:
                    bundle_id:
                      description: The bundle ID of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: The shared secret of the app
                      type: string
                      minLength: 32
                      maxLength: 32
                      nullable: true
                play_store:
                  description: >-
                    Play Store type details. Should only be used when type is
                    play_store.
                  type: object
                  required:
                    - package_name
                  nullable: false
                  properties:
                    package_name:
                      description: The package name of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                stripe:
                  description: >-
                    Stripe type details. Should only be used when type is
                    stripe.
                  type: object
                  nullable: false
                  properties:
                    stripe_account_id:
                      description: >-
                        It needs to be connected to your RevenueCat account. It
                        can be omitted if you only have a single Stripe account
                        connected to your RevenueCat account.
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                rc_billing:
                  description: >-
                    Web Billing type details. Should only be used when type is
                    rc_billing.
                  type: object
                  nullable: false
                  properties:
                    stripe_account_id:
                      description: >-
                        It needs to be connected to your RevenueCat account. It
                        can be omitted if you only have a single Stripe account
                        connected to your RevenueCat account.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 256
                    app_name:
                      description: >-
                        Shown in checkout, emails, and receipts sent to
                        customers.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 256
                    support_email:
                      description: >-
                        Used as the `reply to` address in all emails sent to
                        customers, to allow them to receive support. If you
                        leave this field blank, your RevenueCat account email
                        address will be used.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 320
                    default_currency:
                      $ref: '#/components/schemas/RCBillingCurrency'
                roku:
                  description: >-
                    Roku Channel Store type details. Should only be used when
                    type is roku.
                  type: object
                  nullable: false
                  properties:
                    roku_api_key:
                      description: >-
                        Roku Pay API key provided on the Roku Pay Web Services
                        page.
                      type: string
                      minLength: 33
                      maxLength: 33
                      nullable: true
                    roku_channel_id:
                      description: Channel ID provided on the Roku Channel page.
                      type: string
                      minLength: 6
                      maxLength: 6
                      nullable: true
                    roku_channel_name:
                      description: Channel name that is displayed on the Roku Channel page.
                      type: string
                      minLength: 1
                      maxLength: 30
                      nullable: true
              additionalProperties: false
            examples:
              Update App Store App properties:
                value:
                  name: New App name
                  app_store:
                    bundle_id: com.my.new-app
                    shared_secret: 1234567890abcdef1234567890abcdef
              Update App Store App secret:
                value:
                  app_store:
                    shared_secret: 1234567890abcdef1234567890abcdef
              Remove App Store App secret:
                value:
                  app_store:
                    shared_secret: null
      responses:
        '200':
          description: Success. The app was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read_write</code>.
    delete:
      summary: Delete an app
      operationId: delete-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read_write</code>.
  /projects/{project_id}/apps/{app_id}/store_kit_config:
    get:
      summary: Get the StoreKit configuration for an app
      operationId: get-app-storekit-config
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreKitConfigFile'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps:read</code>.
  /projects/{project_id}/customers:
    get:
      summary: Get a list of customers
      operationId: list-customers
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomers'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read</code>.
    post:
      summary: Create a customer
      operationId: create-customer
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read_write
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  description: The ID of the customer
                  type: string
                  minLength: 1
                  maxLength: 1500
                  pattern: ^[0-9a-zA-Z_-]*$
                  example: 19b8de26-77c1-49f1-aa18-019a391603e2
                attributes:
                  type: array
                  maxLength: 50
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - name
                      - value
                    properties:
                      name:
                        description: The name of the attribute
                        nullable: false
                        minLength: 1
                        maxLength: 40
                        oneOf:
                          - $ref: '#/components/schemas/CustomerAttributeReservedName'
                          - $ref: '#/components/schemas/CustomerAttributeCustomName'
                        example: $email
                      value:
                        description: The value of the attribute
                        type: string
                        maxLength: 500
                        nullable: false
                        example: cat@revenuecat.com
              additionalProperties: false
      responses:
        '201':
          description: Success. The customer was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read_write</code>.
  /projects/{project_id}/customers/{customer_id}:
    get:
      summary: Get a customer
      operationId: get-customer
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read
      x-expandable-fields:
        - attributes: customer_information:customers:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `attributes` (requires `customer_information:customers:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - attributes
              example: attributes
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read</code>.
    delete:
      summary: Delete a customer
      operationId: delete-customer
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read_write
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
              example:
                object: customer
                id: b5b7bfd2-66fb-4091-af50-7c3cdccfdf24
                deleted_at: 1658399423658
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read_write</code>.
  /projects/{project_id}/products/{product_id}:
    get:
      summary: Get a product
      operationId: get-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read
      x-expandable-fields:
        - app: project_configuration:apps:read
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `app` (requires `project_configuration:apps:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - app
              example: app
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read</code>.
    delete:
      summary: Delete a product
      operationId: delete-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read_write</code>.
  /projects/{project_id}/products:
    get:
      summary: Get a list of products
      operationId: list-products
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read
      x-expandable-fields:
        - items.app: project_configuration:apps:read
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          in: query
          schema:
            type: string
            example: app1a2b3c4
          description: >-
            This is an optional query parameter to get a list of products of a
            given entitlement associated with a particular app
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.app` (requires `project_configuration:apps:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.app
              example: items.app
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProducts'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read</code>.
    post:
      summary: Create a product
      operationId: create-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - store_identifier
                - app_id
                - type
              properties:
                store_identifier:
                  description: >
                    The store identifier of the product.

                    - For Apple App Store products this is the product ID of the
                    subscription or in-app product.

                    - For Google's Play Store, it should follow the format
                    'productId:basePlanId' for subscription products and SKU for
                    one-time purchase products.

                    - For Stripe, the product identifier that always starts with
                    "prod_"

                    - For Amazon, if it's a subscription, the term SKU of the
                    subscription. If it's a one-time purchase, the SKU of the
                    product.

                    - For Roku, this is the product identifier of the
                    subscription or one-time purchase product.
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: com.revenuecat.magicweather.monthly
                app_id:
                  description: The ID of the app
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: app1a2b3c4
                type:
                  description: The product type
                  nullable: false
                  $ref: '#/components/schemas/ProductType'
                display_name:
                  description: The display name of the product
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Premium Monthly 2023
              additionalProperties: false
            examples:
              App Store:
                value:
                  store_identifier: com.revenuecat.magicweather.monthly9.99
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store Billing Client 4:
                value:
                  store_identifier: com.revenuecat.magicweather.monthly
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Stripe:
                value:
                  store_identifier: prod_LryUFGrmehs0tk
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Amazon:
                value:
                  store_identifier: com.mysubscription.weekly
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store Subscription Billing Client 5:
                value:
                  store_identifier: mySubscription:basePlanId
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store One-time Billing Client 5:
                value:
                  store_identifier: myProductSku
                  app_id: app1a2b3c4
                  type: one_time
                  display_name: Premium Lifetime 2023
      responses:
        '201':
          description: Success. The product was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        <div class="theme-admonition theme-admonition-info alert
        alert--warning">
          <div class="heading">Warning</div>
          <div>This endpoint does not allow to create Web Billing products.</div>
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read_write</code>.
  /projects/{project_id}/entitlements/{entitlement_id}:
    get:
      summary: Get an entitlement
      operationId: get-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read
      x-release-status: public
      x-expandable-fields:
        - product: project_configuration:products:read
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - product
              example: product
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read</code>.
    post:
      summary: Update an entitlement
      operationId: update-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read_write
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - display_name
              properties:
                display_name:
                  description: The display name of the entitlement
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Premium
              additionalProperties: false
      responses:
        '200':
          description: Success. The entitlement was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read_write</code>.
    delete:
      summary: Delete an entitlement
      operationId: delete-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read_write
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read_write</code>.
  /projects/{project_id}/entitlements:
    get:
      summary: Get a list of entitlements
      operationId: list-entitlements
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read
      x-release-status: public
      x-expandable-fields:
        - items.product: project_configuration:products:read
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.product
              example: items.product
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitlements'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read</code>.
    post:
      summary: Create an entitlement
      operationId: create-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read_write
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lookup_key
                - display_name
              properties:
                lookup_key:
                  description: The identifier of the entitlement
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: premium
                display_name:
                  description: The display name of the entitlement
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Premium access to all features
              additionalProperties: false
      responses:
        '201':
          description: Success. The entitlement was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read_write</code>.
  /projects/{project_id}/entitlements/{entitlement_id}/products:
    get:
      summary: Get a list of products attached to a given entitlement
      operationId: get-products-from-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsFromEntitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read</code>.
  /projects/{project_id}/entitlements/{entitlement_id}/actions/attach_products:
    post:
      summary: Attach a set of products to an entitlement
      operationId: attach-products-to-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read_write
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_ids
              properties:
                product_ids:
                  description: IDs of the products to be attached to the entitlement.
                  type: array
                  minLength: 1
                  maxLength: 50
                  items:
                    type: string
                    maxLength: 255
                    minLength: 1
                    example: prod1a2b3c4d5e
              additionalProperties: false
      responses:
        '200':
          description: Success. The products were attached to the entitlement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read_write</code>.
  /projects/{project_id}/entitlements/{entitlement_id}/actions/detach_products:
    post:
      summary: Detach a set of product from an entitlement
      operationId: detach-products-from-entitlement
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:entitlements:read_write
      x-release-status: public
      tags:
        - Entitlement
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: entitlement_id
          description: ID of the entitlement
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: entla1b2c3d4e5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_ids
              properties:
                product_ids:
                  description: IDs of the products to be detached from the entitlement.
                  type: array
                  minLength: 1
                  maxLength: 50
                  items:
                    type: string
                    maxLength: 255
                    minLength: 1
                    example: prod1a2b3c4d5e
              additionalProperties: false
      responses:
        '200':
          description: Success. The products were detached from the entitlement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:entitlements:read_write</code>.
  /projects/{project_id}/offerings/{offering_id}:
    get:
      summary: Get an offering
      operationId: get-offering
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read
      x-release-status: public
      x-expandable-fields:
        - package: project_configuration:packages:read
        - package.product: project_configuration:products:read
      tags:
        - Offering
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: offering_id
          description: ID of the offering
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: ofrnge1a2b3c4d5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `package` (requires `project_configuration:packages:read` permission), `package.product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - package
                - package.product
              example: package
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offering'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read</code>.
    post:
      summary: Update an offering
      operationId: update-offering
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Offering
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: offering_id
          description: ID of the offering
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: ofrnge1a2b3c4d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  description: The display name of the offering
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: premium access to features
                is_current:
                  description: Indicates if the offering is the current offering
                  type: boolean
                  example: true
                metadata:
                  description: Custom metadata of the offering
                  nullable: true
                  $ref: '#/components/schemas/OfferingMetadata'
              additionalProperties: false
      responses:
        '200':
          description: Success. The offering was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offering'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>.
    delete:
      summary: Delete an offering and its attached packages
      operationId: delete-offering
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Offering
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: offering_id
          description: ID of the offering
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: ofrnge1a2b3c4d5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>.
  /projects/{project_id}/offerings:
    get:
      summary: Get a list of offerings
      operationId: list-offerings
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read
      x-release-status: public
      x-expandable-fields:
        - items.package: project_configuration:packages:read
        - items.package.product: project_configuration:products:read
      tags:
        - Offering
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.package` (requires `project_configuration:packages:read` permission), `items.package.product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.package
                - items.package.product
              example: items.package
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOfferings'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read</code>.
    post:
      summary: Create an offering
      operationId: create-offering
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Offering
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lookup_key
                - display_name
              properties:
                lookup_key:
                  description: The custom identifier of the offering
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: default
                display_name:
                  description: The display_name of the offering
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: The standard set of packages
                metadata:
                  description: Custom metadata of the offering
                  nullable: true
                  $ref: '#/components/schemas/OfferingMetadata'
              additionalProperties: false
      responses:
        '201':
          description: Success. The offering was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offering'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>.
  /projects/{project_id}/packages/{package_id}:
    get:
      summary: Get a package
      operationId: get-package
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read
      x-expandable-fields:
        - product: project_configuration:products:read
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - product
              example: product
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read</code>.
    post:
      summary: Update a package
      operationId: update-package
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read_write
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  description: The display name of the package
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: monthly with one-week trial
                position:
                  description: The position of the package within the offering
                  type: integer
                  minimum: 1
                  example: 2
              additionalProperties: false
      responses:
        '200':
          description: Success. The package was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read_write</code>.
    delete:
      summary: Delete a package
      operationId: delete-package-from-offering
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read_write
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read_write</code>.
  /projects/{project_id}/offerings/{offering_id}/packages:
    get:
      summary: Get a list of packages in an offering
      operationId: list-packages
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read
      x-expandable-fields:
        - items.product: project_configuration:products:read
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: offering_id
          description: ID of the offering
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: ofrnge1a2b3c4d5
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.product` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.product
              example: items.product
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPackages'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read</code>.
    post:
      summary: Create a package
      operationId: create-packages
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read_write
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: offering_id
          description: ID of the offering
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: ofrnge1a2b3c4d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lookup_key
                - display_name
              properties:
                lookup_key:
                  description: The lookup_key of the package
                  nullable: false
                  example: monthly
                  type: string
                  minLength: 1
                  maxLength: 200
                display_name:
                  description: The display name of the package
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: monthly with one-week trial
                position:
                  description: The position of the package in the offering
                  type: integer
                  example: 1
              additionalProperties: false
      responses:
        '201':
          description: Success. The package was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read_write</code>.
  /projects/{project_id}/packages/{package_id}/products:
    get:
      summary: Get a list of products attached to a given package of an offering
      operationId: get-products-from-package
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsFromPackage'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read</code>.
  /projects/{project_id}/packages/{package_id}/actions/attach_products:
    post:
      summary: Attach a set of products to a package
      operationId: attach-products-to-package
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read_write
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - products
              properties:
                products:
                  description: Product association list
                  type: array
                  minLength: 1
                  maxLength: 50
                  items:
                    $ref: '#/components/schemas/PackageProductIDAssociation'
              additionalProperties: false
            examples:
              Single product for package (applies to any store):
                value:
                  products:
                    - product_id: prod1a2b3c4d5e
                      eligibility_criteria: all
              Play Store with different products depending on SDK version (SDK v6+ and SDK <v5) for one package:
                value:
                  products:
                    - product_id: prod1a2b3c4d5e
                      eligibility_criteria: google_sdk_lt_6
                    - product_id: prod445abb3188
                      eligibility_criteria: google_sdk_ge_6
      responses:
        '200':
          description: Success. The products were attached to the package.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read_write</code>.
  /projects/{project_id}/packages/{package_id}/actions/detach_products:
    post:
      summary: Detach a set of products from a package
      operationId: detach-products-from-package
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:packages:read_write
      x-release-status: public
      tags:
        - Package
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: package_id
          description: ID of the package
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pkge1a2b3c4d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_ids
              properties:
                product_ids:
                  description: IDs of the products to detach from the package
                  type: array
                  minLength: 1
                  maxLength: 50
                  items:
                    type: string
                    maxLength: 255
                    minLength: 1
                    example: prod1a2b3c4d5e
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:packages:read_write</code>.
  /projects/{project_id}/subscriptions/{subscription_id}:
    get:
      summary: Get a subscription
      operationId: get-subscription
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:subscriptions:read
      x-release-status: public
      tags:
        - Subscription
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: subscription_id
          description: ID of the subscription
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: sub1a2b3c4d5e
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:subscriptions:read</code>.
  /projects/{project_id}/subscriptions/{subscription_id}/entitlements:
    get:
      summary: Get a list of entitlements associated with a subscription
      operationId: list-subscription-entitlements
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:subscriptions:read
      x-release-status: public
      tags:
        - Subscription
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: subscription_id
          description: ID of the subscription
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: sub1a2b3c4d5e
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitlements'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: |-
        Lists all Entitlements granted by a Subscription.
         This endpoint requires the following permission(s): <code>customer_information:subscriptions:read</code>.
  /projects/{project_id}/subscriptions/{subscription_id}/actions/cancel:
    post:
      summary: Cancel an active Web Billing subscription
      operationId: cancel-subscription
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:subscriptions:read_write
      x-release-status: public
      tags:
        - Subscription
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: subscription_id
          description: ID of the subscription
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: sub1a2b3c4d5e
      responses:
        '200':
          description: Success. The subscription has been successfully canceled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        Cancel an active Web Billing subscription. The customer will lose access
        to the associated entitlements at the end of the current period.
         This endpoint requires the following permission(s): <code>customer_information:subscriptions:read_write</code>.
  /projects/{project_id}/subscriptions/{subscription_id}/actions/refund:
    post:
      summary: Refund an active Web Billing subscription
      operationId: refund-subscription
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:subscriptions:read_write
      x-release-status: public
      tags:
        - Subscription
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: subscription_id
          description: ID of the subscription
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: sub1a2b3c4d5e
      responses:
        '200':
          description: Success. The subscription has been successfully refunded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        Cancel a Web Billing subscription by refunding the most recent payment.
        The customer will immediately lose access to the associated
        entitlements.
         This endpoint requires the following permission(s): <code>customer_information:subscriptions:read_write</code>.
  /projects/{project_id}/customers/{customer_id}/subscriptions:
    get:
      summary: Get a list of subscriptions associated with a customer
      operationId: list-subscriptions
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:subscriptions:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: environment
          in: query
          schema:
            type: string
            enum:
              - sandbox
              - production
          example: production
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptions'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:subscriptions:read</code>.
  /projects/{project_id}/purchases/{purchase_id}:
    get:
      summary: Get a purchase
      operationId: get-purchase
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Purchase'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:purchases:read</code>.
  /projects/{project_id}/purchases/{purchase_id}/entitlements:
    get:
      summary: Get a list of entitlements associated with a purchase
      operationId: list-purchase-entitlements
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitlements'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: |-
        Lists all Entitlements granted by a Purchase.
         This endpoint requires the following permission(s): <code>customer_information:purchases:read</code>.
  /projects/{project_id}/purchases/{purchase_id}/actions/refund:
    post:
      summary: Refund a Web Billing purchase
      operationId: refund-purchase
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read_write
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
      responses:
        '200':
          description: Success. The purchase has been successfully refunded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Purchase'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        Refund a Web Billing purchase and revoke access to associated granted
        entitlements.
         This endpoint requires the following permission(s): <code>customer_information:purchases:read_write</code>.
  /projects/{project_id}/customers/{customer_id}/purchases:
    get:
      summary: Get a list of purchases associated with a customer
      operationId: list-purchases
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: environment
          in: query
          schema:
            type: string
            enum:
              - sandbox
              - production
          example: production
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPurchases'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:purchases:read</code>.
  /projects/{project_id}/customers/{customer_id}/active_entitlements:
    get:
      summary: Get a list of customer's active entitlements
      operationId: list-customer-active-entitlements
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerActiveEntitlements'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read</code>.
  /projects/{project_id}/customers/{customer_id}/aliases:
    get:
      summary: Get a list of the customer's aliases
      operationId: list-customer-aliases
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerAliases'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read</code>.
  /projects/{project_id}/customers/{customer_id}/attributes:
    get:
      summary: Get a list of the customer's attributes
      operationId: list-customer-attributes
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerAttributes'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read</code>.
    post:
      summary: Set a customer's attributes
      operationId: set-customer-attributes
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:customers:read_write
      x-release-status: public
      tags:
        - Customer
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - attributes
              properties:
                attributes:
                  type: array
                  nullable: false
                  minItems: 1
                  maxItems: 50
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - name
                      - value
                    properties:
                      name:
                        description: The name of the attribute
                        nullable: false
                        minLength: 1
                        maxLength: 40
                        oneOf:
                          - $ref: '#/components/schemas/CustomerAttributeReservedName'
                          - $ref: '#/components/schemas/CustomerAttributeCustomName'
                        example: $email
                      value:
                        description: >-
                          The value of the attribute. Use null to delete the
                          attribute.
                        type: string
                        maxLength: 500
                        nullable: true
                    example: cat@revenuecat.com
      responses:
        '200':
          description: Success. The customer attributes were set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerAttributes'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:customers:read_write</code>.
  /projects/{project_id}/customers/{customer_id}/invoices:
    get:
      summary: Get a list of the customer's invoices
      operationId: list-customer-invoices
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:invoices:read
      x-release-status: public
      tags:
        - Invoice
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerInvoices'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:invoices:read</code>.
  /projects/{project_id}/customers/{customer_id}/invoices/{invoice_id}/file:
    get:
      summary: Get an invoice
      operationId: get-invoice
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:invoices:read
      x-release-status: public
      tags:
        - Invoice
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: customer_id
          in: path
          description: ID of the customer
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: 19b8de26-77c1-49f1-aa18-019a391603e2
        - name: invoice_id
          in: path
          description: ID of the invoice
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1500
            example: rcbin1a2b3c4d5e
      responses:
        '302':
          description: File found. Needs to be downloaded from the location header
          headers:
            location:
              description: The URL to download the invoice pdf
              schema:
                type: string
                format: uri
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>customer_information:invoices:read</code>.
  /projects/{project_id}/metrics/overview:
    get:
      summary: Get overview metrics for a project
      operationId: get-overview-metrics
      x-revenuecat-rate-limiting-domain: charts_metrics
      x-scopes:
        - charts_metrics:overview:read
      x-release-status: public
      tags:
        - Charts & Metrics
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OverviewMetrics'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>charts_metrics:overview:read</code>.
components:
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
  schemas:
    AmazonApp:
      type: object
      properties:
        amazon:
          description: Amazon type details
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
    AmazonAppCreate:
      type: object
      properties:
        amazon:
          description: Amazon type details. Should only be used when type is amazon.
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: Your Amazon Developer Identity Shared Key
              type: string
              nullable: false
    App:
      allOf:
        - type: object
          required:
            - id
            - name
            - created_at
            - type
            - project_id
            - object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value.
              enum:
                - app
              type: string
            id:
              description: The id of the app
              nullable: false
              type: string
              minLength: 1
              maxLength: 255
              example: app1a2b3c4
            name:
              description: The name of the app
              nullable: false
              type: string
              minLength: 1
              maxLength: 255
            created_at:
              description: The date when the app was created in ms since epoch
              nullable: false
              type: integer
              format: int64
              example: 1658399423658
            type:
              description: The platform of the app
              nullable: false
              type: string
              enum:
                - amazon
                - app_store
                - mac_app_store
                - play_store
                - stripe
                - rc_billing
                - roku
              example: app_store
            project_id:
              description: The id of the project
              nullable: false
              type: string
              minLength: 1
              maxLength: 255
              example: proj1a2b3c4
        - $ref: '#/components/schemas/AmazonApp'
        - $ref: '#/components/schemas/AppStoreApp'
        - $ref: '#/components/schemas/MacAppStoreApp'
        - $ref: '#/components/schemas/PlayStoreApp'
        - $ref: '#/components/schemas/StripeApp'
        - $ref: '#/components/schemas/RCBillingApp'
        - $ref: '#/components/schemas/RokuApp'
    AppCreate:
      allOf:
        - type: object
          required:
            - name
            - type
          properties:
            name:
              description: The name of the app
              type: string
              minLength: 1
              maxLength: 255
              nullable: false
            type:
              description: >
                The platform of the app.

                Mac App Store is disabled by default. See [Legacy Mac
                Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
                details.
              type: string
              enum:
                - amazon
                - app_store
                - mac_app_store
                - play_store
                - stripe
                - rc_billing
                - roku
              nullable: false
        - $ref: '#/components/schemas/AmazonAppCreate'
        - $ref: '#/components/schemas/AppStoreAppCreate'
        - $ref: '#/components/schemas/MacAppStoreAppCreate'
        - $ref: '#/components/schemas/PlayStoreAppCreate'
        - $ref: '#/components/schemas/StripeAppCreate'
        - $ref: '#/components/schemas/RCBillingAppCreate'
        - $ref: '#/components/schemas/RokuAppCreate'
    AppStoreApp:
      type: object
      properties:
        app_store:
          description: App Store type details
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
    AppStoreAppCreate:
      type: object
      properties:
        app_store:
          description: App Store type details. Should only be used when type is app_store.
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: The shared secret of the app
              type: string
              minLength: 32
              maxLength: 32
              nullable: false
            subscription_private_key:
              description: >
                PKCS /#8 In App Key downloaded from App Store Connect in PEM
                format. Copy the contents

                of the file in this field. See instructions on how to get it
                in: 

                https://www.revenuecat.com/docs/in-app-purchase-key-configuration
              type: string
              minLength: 1
              maxLength: 4500
              nullable: false
            subscription_key_id:
              description: >-
                In App Key id. The ID of the downloaded in app key. You can get
                it from App Store Connect
              type: string
              minLength: 1
              maxLength: 32
              nullable: false
            subscription_key_issuer:
              description: >-
                The key Issuer id. See instructions on how to obtain this in:
                https://www.revenuecat.com/docs/in-app-purchase-key-configuration#3-providing-the-issuer-id-to-revenuecat 
              type: string
              minLength: 1
              maxLength: 36
              nullable: false
    Country:
      type: string
      nullable: true
      example: US
      description: The country that the object is associated with, in ISO alpha 2 code
      enum:
        - null
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CD
        - CG
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - CI
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - MK
        - RO
        - RU
        - RW
        - RE
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
    Currency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTC
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWL
    Customer:
      type: object
      required:
        - id
        - project_id
        - first_seen_at
        - last_seen_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - customer
          type: string
        id:
          type: string
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        project_id:
          nullable: false
          description: ID of the project to which the customer belongs
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        first_seen_at:
          nullable: false
          description: The first time the customer was seen
          type: integer
          format: int64
          example: 1658399423658
        last_seen_at:
          nullable: true
          description: The last time the customer was seen
          type: integer
          format: int64
          example: 1658399423658
        active_entitlements:
          allOf:
            - type: object
              description: >-
                List of the entitlements currently active for the customer. This
                property is only available in the "Get a customer" endpoint.
              nullable: true
            - $ref: '#/components/schemas/ListCustomerActiveEntitlements'
        experiment:
          description: The experiment enrollment object
          nullable: true
          $ref: '#/components/schemas/ExperimentEnrollment'
        attributes:
          allOf:
            - type: object
              description: >-
                List of the attributes of the customer. This is an expandable
                property, only available in the "Get a customer" endpoint.
              nullable: true
            - $ref: '#/components/schemas/ListCustomerAttributes'
    CustomerAlias:
      type: object
      required:
        - id
        - created_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - customer.alias
          type: string
        id:
          type: string
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        created_at:
          nullable: false
          description: The time when the alias was created
          type: integer
          format: int64
          example: 1658399423658
    CustomerAttribute:
      type: object
      required:
        - name
        - value
        - updated_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - customer.attribute
          type: string
        name:
          nullable: false
          description: >-
            The name of the attribute. Reserved attributes are prefixed with a
            `$`.
          type: string
          maxLength: 1500
          example: $email
        value:
          nullable: true
          description: The value of the attribute.
          type: string
          example: garfield@revenuecat.com
        updated_at:
          nullable: false
          description: The time when the attribute was last updated.
          type: integer
          format: int64
          example: 1658399423658
    CustomerAttributeCustomName:
      type: string
      maxLength: 40
      pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$
      example: opt_into_marketing
    CustomerAttributeReservedName:
      type: string
      enum:
        - $ad
        - $adGroup
        - $adjustId
        - $airshipChannelId
        - $amazonAdId
        - $amplitudeDeviceId
        - $amplitudeUserId
        - $appleRefundHandlingPreference
        - $apnsTokens
        - $appsflyerId
        - $appsflyerSharingFilter
        - $attConsentStatus
        - $branchId
        - $brazeAliasLabel
        - $brazeAliasName
        - $campaign
        - $clevertapId
        - $creative
        - $customerioId
        - $displayName
        - $email
        - $fbAnonId
        - $fcmTokens
        - $firebaseAppInstanceId
        - $gpsAdId
        - $idfa
        - $idfv
        - $ip
        - $iterableCampaignId
        - $iterableTemplateId
        - $iterableUserId
        - $keyword
        - $kochavaDeviceId
        - $mediaSource
        - $mixpanelDistinctId
        - $mparticleId
        - $onesignalId
        - $onesignalUserId
        - $phoneNumber
        - $posthogUserId
        - $telemetryDeckUserId
        - $telemetryDeckAppId
        - telemetry_deck_user_id
        - telemetry_deck_app_id
        - $segmentId
        - $tenjinId
        - $deviceVersion
      example: $email
    CustomerEntitlement:
      type: object
      required:
        - entitlement_id
        - expires_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - customer.active_entitlement
          type: string
        entitlement_id:
          nullable: false
          description: ID of the entitlement granted to the customer
          minLength: 1
          maxLength: 255
          type: string
          example: entla1b2c3d4e5
        expires_at:
          nullable: true
          description: >-
            The date after which the access to the entitlement expires in ms
            since epoch
          type: integer
          format: int64
          example: 1658399423658
    DeletedObject:
      type: object
      required:
        - object
        - id
        - deleted_at
      properties:
        object:
          description: The type of the deleted object
          enum:
            - app
            - customer
            - entitlement
            - offering
            - package
            - product
          type: string
        id:
          description: The ID of the deleted object
          nullable: false
          type: string
        deleted_at:
          nullable: false
          type: integer
          format: int64
          description: The date when the object was deleted in ms since epoch
          example: 1658399423658
    EligibilityCriteria:
      type: string
      nullable: false
      enum:
        - all
        - google_sdk_lt_6
        - google_sdk_ge_6
    Entitlement:
      type: object
      required:
        - project_id
        - id
        - lookup_key
        - display_name
        - created_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - entitlement
          type: string
        project_id:
          nullable: false
          description: ID of the project to which the entitlement belongs
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        id:
          description: The id of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: entla1b2c3d4e5
        lookup_key:
          description: A custom identifier of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 200
          example: premium
        display_name:
          description: The display name of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium
        created_at:
          nullable: false
          type: integer
          format: int64
          description: The date when the entitlement was created in ms since epoch
          example: 1658399423658
        products:
          description: List of products attached to the entitlement
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: ProductsList
          type: object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Details about each object.
              items:
                $ref: '#/components/schemas/Product'
              type: array
            next_page:
              description: >-
                URL to access the next page of the Entitlement's products. If
                not present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products
    Environment:
      type: string
      description: The store environment
      example: production
      nullable: false
      enum:
        - production
        - sandbox
    Error:
      type: object
      required:
        - type
        - message
        - retryable
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - error
          type: string
          example: error
        type:
          description: The error type
          type: string
          nullable: false
          enum:
            - parameter_error
            - resource_already_exists
            - resource_missing
            - idempotency_error
            - rate_limit_error
            - authentication_error
            - authorization_error
            - store_error
            - server_error
            - resource_locked_error
            - unprocessable_entity_error
            - invalid_request
          example: parameter_error
        param:
          description: >-
            If the error is parameter-specific, the parameter related to the
            error
          type: string
          nullable: true
          example: customer_id
        doc_url:
          description: A URL to more information about the error reported
          type: string
          nullable: false
          example: https://errors.rev.cat/parameter-error
        message:
          type: string
          description: A message describing the reason of the error
          nullable: false
          example: id shouldn't be longer than 1,500 characters
        retryable:
          description: Indicates if the error is retryable or not
          type: boolean
          nullable: false
          example: false
        backoff_ms:
          description: >-
            The ms the client should wait before retrying the request. Only
            present for retryable errors.
          type: integer
          nullable: true
          example: null
    ExperimentEnrollment:
      type: object
      required:
        - id
        - name
        - variant
        - object
      nullable: true
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - experiment_enrollment
          type: string
        id:
          type: string
          maxLength: 1500
        name:
          type: string
          maxLength: 1500
        variant:
          nullable: false
          description: >-
            The variant of the Experiment that the Customer was or is assigned
            to, where 'a' represents the Control, and 'b' represents the
            Treatment.
          minLength: 1
          maxLength: 1
          type: string
          example: a
    Invoice:
      type: object
      required:
        - id
        - total_amount
        - line_items
        - issued_at
        - paid_at
        - invoice_url
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - invoice
          type: string
        id:
          description: The id of the invoice
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: rcbin1a2b3c4d5e
        total_amount:
          $ref: '#/components/schemas/MonetaryAmount'
        line_items:
          description: >-
            List of line items that are part of the invoice. Each line item
            represents a product that was purchased.
          title: InvoiceLiteItemList
          nullable: false
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
          type: array
        issued_at:
          description: The date when the invoiced was issued in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        paid_at:
          description: The date when the invoiced was paid in ms since epoch
          nullable: true
          type: integer
          format: int64
          example: 1658399423658
        invoice_url:
          description: URL to download the invoice pdf
          nullable: true
          type: string
          example: >-
            https://api.revenuecat.com/v2/projects/proj1ab2c3d4/customers/cust1ab2c3d4/invoices/inv1ab2c3d4/file
    InvoiceLineItem:
      type: object
      required:
        - product_identifier
        - product_display_name
        - product_duration
        - quantity
        - unit_amount
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - invoice.line_item
          type: string
        product_identifier:
          description: The product identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: rc_1w_199
        product_display_name:
          description: The display name of the product
          nullable: true
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium Monthly 2023
        product_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription in ISO-8601 standard
          example: P1M
        quantity:
          description: Total purchased items
          nullable: false
          type: integer
          example: 1
        unit_amount:
          $ref: '#/components/schemas/MonetaryAmount'
    ListApps:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: AppList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/App'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's apps. If not present /
            null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/projec1a2b3c4d/apps?starting_after=app1a2b3c4d
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/projec1a2b3c4d/apps
    ListCustomerActiveEntitlements:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: CustomerActiveEntitlementList
      description: >-
        List of the entitlements currently active for the customer. This
        property is only available in the "Get a customer" endpoint.
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/CustomerEntitlement'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's active entitlements.
            If not present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements
    ListCustomerAliases:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: CustomerAliasList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/CustomerAlias'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's aliases. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/aliases?starting_after=9fjeja8fjed
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/aliases
    ListCustomerAttributes:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: CustomerAttributeList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/CustomerAttribute'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's aliases. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/attributes?starting_after=myCustomAttribute
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/attributes
    ListCustomerInvoices:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: CustomerInvoicesList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Invoice'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's invoice. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/invoices?starting_after=rcbin1a2b3c4d5e
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/invoices
    ListCustomers:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: CustomerList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Customer'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's customers. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/projec1a2b3c4d/customers?starting_after=223xx1100
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/projec1a2b3c4d/customers
    ListEntitlements:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: EntitlementList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Entitlement'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's entitlements. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/entitlements?starting_after=entlab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/entitlements
    ListOfferings:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: OfferingList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Offering'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's offerings. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/offerings?starting_after=ofrngeab21da
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/offerings
    ListPackages:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: PackageList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Package'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's packages. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages
    ListProducts:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: ProductList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Product'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's products. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/products?starting_after=prodab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/products
    ListProjects:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: ProjectList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Project'
          type: array
        next_page:
          description: >-
            URL to access the next page of the projects. If not present / null,
            there is no next page
          type: string
          nullable: true
          example: /v2/projects?starting_after=projab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects
    ListPublicApiKeys:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: PublicApiKeyList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/PublicApiKey'
          type: array
        next_page:
          description: >-
            URL to access the next page of the app's public API keys. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/projec1a2b3c4d/apps/app1a2b3c4d/public_api_keys?starting_after=pub1a2b3c4d
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/projec1a2b3c4d/apps/app1a2b3c4d/public_api_keys
    ListPurchases:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: PurchaseList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Purchase'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's purchases. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases?starting_after=purc1a2b3c4d5e
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases
    ListSubscriptions:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: SubscriptionList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Subscription'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's subscriptions. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions?starting_after=sub1a2b3c4d
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions
    MacAppStoreApp:
      type: object
      properties:
        mac_app_store:
          description: Legacy Mac App Store type details
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
    MacAppStoreAppCreate:
      type: object
      properties:
        mac_app_store:
          description: >-
            Mac App Store type details. Should only be used when type is
            mac_app_store.
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: The shared secret of the app
              type: string
              minLength: 32
              maxLength: 32
              nullable: false
    MonetaryAmount:
      type: object
      required:
        - currency
        - gross
        - tax
        - proceeds
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        gross:
          description: Total revenue generated (excluding taxes and commission)
          nullable: false
          type: number
          example: 9.99
        commission:
          description: >-
            Store commission or payment processor fees deducted from gross
            revenue (if any)
          nullable: false
          type: number
          example: 2.99
        tax:
          description: Estimated taxes deducted from gross revenue
          nullable: false
          type: number
          example: 0.75
        proceeds:
          description: Net revenue after store commission / fees and taxes
          nullable: false
          type: number
          example: 6.25
    Offering:
      type: object
      required:
        - id
        - lookup_key
        - display_name
        - is_current
        - created_at
        - project_id
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - offering
          type: string
        id:
          description: The id of the offering
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: ofrnge1a2b3c4d5
        lookup_key:
          description: A custom identifier of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 200
          example: default
        display_name:
          description: The display name of the offering
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: The standard set of packages
        is_current:
          description: Indicates if the offering is the current offering
          nullable: false
          type: boolean
          example: true
        created_at:
          description: The date the offering was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        project_id:
          description: ID of the project to which the offering belongs
          nullable: false
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        metadata:
          description: Custom metadata of the offering
          nullable: true
          $ref: '#/components/schemas/OfferingMetadata'
        packages:
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: PackageList
          type: object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Details about each object.
              items:
                $ref: '#/components/schemas/Package'
              type: array
            next_page:
              description: >-
                URL to access the next page of the Offering's packages. If not
                present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages
    OfferingMetadata:
      description: Custom metadata of the offering
      type: object
      nullable: true
      additionalProperties: true
      example:
        color: blue
        call_to_action: Subscribe Now!
    OneTimeProduct:
      type: object
      required:
        - is_consumable
      nullable: true
      properties:
        is_consumable:
          type: boolean
          nullable: true
          description: Indicates whether the product is consumable or not.
          example: true
    OverviewMetric:
      type: object
      required:
        - id
        - name
        - description
        - unit
        - period
        - value
        - last_updated_at
        - last_updated_at_iso8601
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - overview_metric
          type: string
        id:
          description: Id of the overview metric
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: active_trials
        name:
          description: Display name of the overview metric
          nullable: false
          type: string
          example: Active Trials
        description:
          description: Description of the overview metric
          nullable: false
          type: string
        unit:
          description: Unit of the overview metric
          nullable: false
          type: string
          example: $
        period:
          description: >-
            Length of time during which metric data is collected in ISO 8601
            format. Zero period means metric data was collected now
          nullable: false
          type: string
          enum:
            - P0D
            - P28D
          example: P0D
        value:
          description: Value of the overview metric
          nullable: false
          type: number
          example: 34765
        last_updated_at:
          description: Last time the overview metric was updated in ms since epoch
          nullable: true
          type: integer
          format: int64
          example: 1658399423658
        last_updated_at_iso8601:
          description: >-
            Last time the overview metric was updated datetime in ISO 8601
            format
          nullable: true
          type: string
          format: date-time
          example: '2022-10-13 09:45:00.123000+00:00'
    OverviewMetrics:
      type: object
      required:
        - metrics
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - overview_metrics
          type: string
        metrics:
          description: Details about each overview metric.
          items:
            $ref: '#/components/schemas/OverviewMetric'
          type: array
    Ownership:
      type: string
      example: purchased
      enum:
        - purchased
        - family_shared
    Package:
      type: object
      required:
        - id
        - lookup_key
        - display_name
        - position
        - created_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - package
          type: string
        id:
          description: The id of the package
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: pkge1a2b3c4d5
        lookup_key:
          description: The lookup_key of the package
          nullable: false
          example: monthly
          type: string
          minLength: 1
          maxLength: 200
        display_name:
          description: The display name of the package
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: Monthly discounted with 3-day trial
        position:
          description: The position of the package within the offering
          nullable: true
          type: integer
          example: 1
        created_at:
          description: The date the package was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        products:
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: ProductList
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Product association
              items:
                $ref: '#/components/schemas/PackageProductAssociation'
              type: array
            next_page:
              description: >-
                URL to access the next page of the project's products. If not
                present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products
    PackageProductAssociation:
      type: object
      required:
        - product
        - eligibility_criteria
      properties:
        product:
          $ref: '#/components/schemas/Product'
          nullable: false
        eligibility_criteria:
          $ref: '#/components/schemas/EligibilityCriteria'
          nullable: false
    PackageProductIDAssociation:
      type: object
      required:
        - product_id
        - eligibility_criteria
      properties:
        product_id:
          type: string
          maxLength: 255
          minLength: 1
          nullable: false
        eligibility_criteria:
          $ref: '#/components/schemas/EligibilityCriteria'
          nullable: false
    Paywall:
      type: object
      required:
        - id
        - name
        - offering_id
        - created_at
        - published_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - paywall
          type: string
        id:
          description: The id of the paywall
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: pw123456789abcdef
        name:
          description: The name of the paywall
          nullable: true
          type: string
          minLength: 1
          maxLength: 255
          example: My Awesome Paywall
        offering_id:
          description: The ID of the offering the paywall is for.
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: ofrng123456789a
        created_at:
          description: The date the paywall was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        published_at:
          description: The date the paywall was published at in ms since epoch
          nullable: true
          type: integer
          format: int64
          example: 1658399423958
    PlayStoreApp:
      type: object
      properties:
        play_store:
          description: Play Store type details
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
    PlayStoreAppCreate:
      type: object
      properties:
        play_store:
          description: >-
            Play Store type details. Should only be used when type is
            play_store.
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
    Product:
      type: object
      required:
        - id
        - store_identifier
        - type
        - created_at
        - app_id
        - object
        - display_name
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - product
          type: string
        id:
          description: The id of the product
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: prod1a2b3c4d5e
        store_identifier:
          description: The store product identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: rc_1w_199
        type:
          description: The product type
          nullable: false
          $ref: '#/components/schemas/ProductType'
        subscription:
          description: The subscription product object
          nullable: true
          $ref: '#/components/schemas/SubscriptionProduct'
        one_time:
          description: The one time product object
          nullable: true
          $ref: '#/components/schemas/OneTimeProduct'
        created_at:
          description: The date when the product was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        app_id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        app:
          description: The app associated with the product
          nullable: true
          $ref: '#/components/schemas/App'
        display_name:
          description: The display name of the product
          nullable: true
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium Monthly 2023
    ProductType:
      type: string
      nullable: false
      enum:
        - subscription
        - one_time
    ProductsFromEntitlement:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: ProductsFromEntitlementList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Product'
          type: array
        next_page:
          description: >-
            URL to access the next page of the entitlement's products. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products?starting_after=prod1a2b3c4d5
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products
    ProductsFromPackage:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: ProductsFromPackageList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/PackageProductAssociation'
          type: array
        next_page:
          description: >-
            URL to access the next page of the entitlement's products. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products?starting_after=prod1a2b3c4d5
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products
    Project:
      type: object
      required:
        - id
        - name
        - created_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - project
          type: string
        id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1ab2c3d4
        name:
          description: The name of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 256
          example: MagicWeather
        created_at:
          description: The date when the project was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
    PublicApiKey:
      type: object
      required:
        - id
        - key
        - app_id
        - created_at
        - environment
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - public_api_key
          type: string
        id:
          description: The ID of the public API key
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: apikey12345
        key:
          description: The value of the public API key
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: goog_1ab2c3d4
        environment:
          description: The environment the public API key is for
          nullable: false
          enum:
            - production
            - sandbox
          type: string
        app_id:
          description: The ID of the app the public API key is for
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        created_at:
          description: The date when the public API key was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
    Purchase:
      type: object
      required:
        - id
        - customer_id
        - original_customer_id
        - product_id
        - purchased_at
        - revenue_in_usd
        - quantity
        - status
        - presented_offering_id
        - entitlements
        - environment
        - store
        - store_purchase_identifier
        - ownership
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - purchase
          type: string
        id:
          description: The id of the purchase
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: purch1a2b3c4d5e
        customer_id:
          description: The id of the customer
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        original_customer_id:
          description: The ID of the original customer
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        product_id:
          description: The ID of the product that was purchased
          nullable: false
          minLength: 1
          maxLength: 255
          type: string
          example: prod1a2b3c4d5e
        purchased_at:
          description: The date when the purchase was made in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        revenue_in_usd:
          description: The revenue generated by the purchase in USD
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/MonetaryAmount'
        quantity:
          description: The quantity of the product purchased in one transaction
          type: integer
          example: 1
        status:
          description: The status of a purchase
          nullable: false
          type: string
          enum:
            - owned
            - refunded
          example: owned
        presented_offering_id:
          description: The ID of the offering the customer saw when they did the purchase
          nullable: true
          type: string
          minLength: 1
          maxLength: 200
          example: ofrnge1a2b3c4d5
        entitlements:
          required:
            - items
            - next_page
            - object
            - url
          title: EntitlementList
          type: object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Details about each object.
              items:
                $ref: '#/components/schemas/Entitlement'
              type: array
            next_page:
              description: >-
                URL to access the next page of the customer's entitlements. If
                not present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements
        environment:
          $ref: '#/components/schemas/Environment'
        store:
          description: Store the purchase belongs to
          nullable: false
          type: string
          enum:
            - amazon
            - app_store
            - mac_app_store
            - play_store
            - promotional
            - stripe
            - rc_billing
          example: amazon
        store_purchase_identifier:
          description: The store purchase identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: 12345678
        ownership:
          description: Ownership of the purchase
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/Ownership'
        country:
          description: Billing country in ISO alpha 2 code
          nullable: true
          $ref: '#/components/schemas/Country'
    RCBillingApp:
      type: object
      properties:
        rc_billing:
          description: Revenue Cat Billing Store type details
          type: object
          required:
            - seller_company_name
            - default_currency
          nullable: false
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
            seller_company_name:
              description: >-
                The company name.  This field is deprecated. Please, use
                `app_name` instead.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
              deprecated: true
            app_name:
              description: Shown in checkout, emails, and receipts sent to customers.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            seller_company_support_email:
              description: >-
                The company support email. This field is deprecated. Please, use
                `support_email` instead.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
              deprecated: true
            support_email:
              description: >-
                Used as the `reply to` address in all emails sent to customers,
                to allow them to receive support. 
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
            default_currency:
              description: The default currency to be used for the app.
              $ref: '#/components/schemas/RCBillingCurrency'
    RCBillingAppCreate:
      type: object
      properties:
        rc_billing:
          description: Revenue Cat Billing Store type details
          type: object
          required:
            - app_name
          nullable: true
          properties:
            stripe_account_id:
              description: >-
                It needs to be connected to your RevenueCat account. It can be
                omitted if you only have a single Stripe account connected to
                your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
            app_name:
              description: Shown in checkout, emails, and receipts sent to customers.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            support_email:
              description: >-
                Used as the `reply to` address in all emails sent to customers,
                to allow them to receive support.  If you leave this field
                blank, your RevenueCat account email address will be used.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
            default_currency:
              $ref: '#/components/schemas/RCBillingCurrency'
    RCBillingCurrency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - AUD
        - CAD
        - EUR
        - GBP
        - JPY
        - USD
    RokuApp:
      type: object
      properties:
        roku:
          description: Roku Channel Store type details
          type: object
          nullable: false
          properties:
            roku_channel_id:
              description: Channel ID provided on the Roku Channel page.
              type: string
              nullable: true
              minLength: 6
              maxLength: 6
            roku_channel_name:
              description: Channel name that is displayed on the Roku Channel page.
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
    RokuAppCreate:
      type: object
      properties:
        roku:
          description: Roku Channel Store details. Should only be used when type is roku.
          type: object
          nullable: true
          properties:
            roku_api_key:
              description: Roku Pay API key provided on the Roku Pay Web Services page.
              type: string
              nullable: true
              minLength: 33
              maxLength: 33
            roku_channel_id:
              description: Channel ID provided on the Roku Channel page.
              type: string
              nullable: true
              minLength: 6
              maxLength: 6
            roku_channel_name:
              description: Channel name that is displayed on the Roku Channel page.
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
    StoreKitConfigFile:
      type: object
      description: Contents of a generated StoreKit config file for an app
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - store_kit_config_file
          type: string
        contents:
          type: object
          description: Contents of the StoreKit config file
          additionalProperties: true
      required:
        - object
        - contents
    StripeApp:
      type: object
      properties:
        stripe:
          description: Stripe type details
          type: object
          nullable: false
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
    StripeAppCreate:
      type: object
      properties:
        stripe:
          description: Stripe type details. Should only be used when type is stripe.
          type: object
          nullable: false
          properties:
            stripe_account_id:
              description: >-
                It needs to be connected to your RevenueCat account. It can be
                omitted if you only have a single Stripe account connected to
                your RevenueCat account.
              type: string
              minLength: 1
              maxLength: 256
              nullable: true
    Subscription:
      type: object
      required:
        - id
        - customer_id
        - original_customer_id
        - product_id
        - starts_at
        - current_period_starts_at
        - current_period_ends_at
        - gives_access
        - pending_payment
        - auto_renewal_status
        - status
        - total_revenue_in_usd
        - presented_offering_id
        - entitlements
        - environment
        - store
        - store_subscription_identifier
        - ownership
        - management_url
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - subscription
          type: string
        id:
          description: The ID of the subscription (generated by RevenueCat)
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: sub1ab2c3d4e5
        customer_id:
          description: The ID of the customer
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        original_customer_id:
          description: >-
            The ID of the original customer. Relevant for subscriptions that
            were transferred from one customer to another
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        product_id:
          description: >-
            The RevenueCat ID of the product that the customer is subscribed to.
            Exists for all store types except for promotional.
          nullable: true
          minLength: 1
          maxLength: 255
          type: string
          example: prod1a2b3c4d5e
        starts_at:
          description: The date when the subscription originally started in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        current_period_starts_at:
          description: >-
            The date when the subscription billing period started in ms since
            epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        current_period_ends_at:
          description: >-
            The date when the subscription billing period is expected to end in
            ms since epoch. Can be null if the subscription is paused until an
            indefinite date.
          nullable: true
          type: integer
          format: int64
          example: 1658399423658
        gives_access:
          description: >-
            Determines whether the customer should currently be provided access
            to the entitlements associated with the subscription
          nullable: false
          type: boolean
          example: true
        pending_payment:
          description: >-
            Determines whether there is a pending payment associated with the
            subscription
          nullable: false
          type: boolean
          example: true
        auto_renewal_status:
          description: >
            The auto renewal status of a subscription.<br><br>Possible
            values:<br>• `will_renew`: the subscription is currently set to
            automatically renew<br>• `will_not_renew`: the subscription is
            currently set to expire at the end of the period<br>•
            `will_change_product`: the subscription is currently set to change
            product at the end of the period (which might start a new
            subscription)<br>• `will_pause`: the subscription is currently set
            to pause at the end of the current period<br>•
            `requires_price_increase_consent`: the subscription will expire at
            the end of the current period unless the customer consents to the
            price increase<br>• `has_already_renewed`: the customer has already
            been charged for the upcoming renewal (so the renewal will take
            place even if the customer opts out of auto-renewal before the end
            of the period)
          nullable: false
          type: string
          enum:
            - will_renew
            - will_not_renew
            - will_change_product
            - will_pause
            - requires_price_increase_consent
            - has_already_renewed
          example: will_renew
        status:
          description: >
            The status of a subscription. Please note that additional states
            might be added in the future. To determine whether or not a
            subscription currently provides access to any associated
            entitlements, use the _gives_access_ field.<br><br>Possible
            values:<br>• `trialing`: the subscription is in a free trial
            period<br>• `active`: the subscription is active, in a paid
            period<br>• `expired`: the subscription is expired and no longer
            active<br>• `in_grace_period`: the subscription is past its regular
            expiry date and experienced a billing issue, but is currently still
            in an access-granting grace period<br>• `in_billing_retry`: the
            subscription has experienced a billing issue. Billing is being
            retried, access is suspended.-paused: the subscription is currently
            paused and should not provide access.<br>• `unknown`: the
            subscription is in an unknown state. Refer to the _gives_access_
            field to determine whether or not to grant access.<br>•
            `incomplete`: the subscription is in an incomplete state, maybe due
            to incorrect billing details or because it's scheduled to start in
            the future.
          nullable: false
          type: string
          enum:
            - trialing
            - active
            - expired
            - in_grace_period
            - in_billing_retry
            - paused
            - unknown
            - incomplete
          example: trialing
        total_revenue_in_usd:
          description: Total revenue generated by a subscription in USD
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/MonetaryAmount'
        presented_offering_id:
          description: >-
            The ID of the offering the customer saw when purchasing the
            subscription
          nullable: true
          type: string
          minLength: 1
          maxLength: 200
          example: ofrnge1a2b3c4d5
        entitlements:
          required:
            - items
            - next_page
            - object
            - url
          title: EntitlementList
          type: object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Details about each object.
              items:
                $ref: '#/components/schemas/Entitlement'
              type: array
            next_page:
              description: >-
                URL to access the next page of the customer's entitlements. If
                not present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: >-
                /v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements
        environment:
          description: The store environment
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/Environment'
        store:
          description: Store the subscription belongs to
          nullable: false
          type: string
          enum:
            - amazon
            - app_store
            - mac_app_store
            - play_store
            - promotional
            - stripe
            - rc_billing
          example: amazon
        store_subscription_identifier:
          description: >-
            The subscription identifier as per the store (e.g, for Apple App
            Store, the `transaction_id` of the latest transaction of the
            subscription, or for Google Play Store, the Order ID of the last
            renewal of the subscription)
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: 12345678
        ownership:
          description: Ownership of the subscription
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/Ownership'
        pending_changes:
          description: >-
            Indicates pending product changes. Present if the
            `auto_renewal_status` is `will_change_product`.
          nullable: true
          type: object
          properties:
            product:
              description: The product that will be active as of the next renewal
              nullable: false
              $ref: '#/components/schemas/Product'
        country:
          $ref: '#/components/schemas/Country'
          description: Billing country in ISO alpha 2 code
          nullable: true
        management_url:
          description: The URL to manage the subscription
          nullable: true
          type: string
          example: https://apps.apple.com/account/subscriptions
    SubscriptionProduct:
      type: object
      required:
        - duration
        - grace_period_duration
        - trial_duration
      nullable: true
      properties:
        duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription in ISO-8601 standard
          example: P1M
        grace_period_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's grace period in ISO-8601 standard
          example: P3D
        trial_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's trial period in ISO-8601 standard
          example: P1W
  headers:
    RateLimitCurrentLimit:
      required: true
      description: The rate limit for this endpoint, expressed in requests per minute.
      schema:
        type: integer
      example: 30
    RateLimitCurrentUsage:
      required: true
      description: >-
        The current number of requests used for the current limit (including the
        current request).
      schema:
        type: integer
      example: 25
    RateLimitRetryAfter:
      required: true
      description: >-
        The number of seconds to wait before retrying a rate limited
        request.Only present when a request is rate limited.
      schema:
        type: integer
      example: 10
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - parameter_error
                      - invalid_request
          examples:
            parameter_error:
              value:
                object: error
                type: parameter_error
                param: customer_id
                message: id is too long
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Content-Type not application/json
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_already_exists
                      - idempotency_error
          examples:
            resource_already_exists:
              value:
                object: error
                type: resource_already_exists
                message: Name is already taken
                retryable: false
                doc_url: https://errors.rev.cat/resource-already-exists
            idempotency_error:
              value:
                object: error
                type: idempotency_error
                message: Idempotency key already used for a different request
                retryable: false
                doc_url: https://errors.rev.cat/idempotency-error
    Forbidden:
      description: Access denied
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authorization_error
            example:
              object: error
              type: authorization_error
              message: You're not authorized to access this resource
              retryable: false
              doc_url: https://errors.rev.cat/authorization-error
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - server_error
            example:
              object: error
              type: server_error
              message: There was an internal server error
              retryable: true
              doc_url: https://errors.rev.cat/server-error
              backoff_ms: 1000
    Locked:
      description: Locked
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_locked_error
            example:
              object: error
              type: resource_locked_error
              message: The resource is currently being modified by a concurrent request
              retryable: true
              doc_url: https://errors.rev.cat/resource-locked-error
              backoff_ms: 1000
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_missing
            example:
              object: error
              type: resource_missing
              message: Resource not found
              retryable: false
              doc_url: https://errors.rev.cat/resource-missing
    RateLimited:
      description: >-
        The request could not be completed because the rate limiting domain for
        this endpoint is currently at its limit for this project.
      headers:
        RevenueCat-Rate-Limit-Current-Usage:
          $ref: '#/components/headers/RateLimitCurrentUsage'
        RevenueCat-Rate-Limit-Current-Limit:
          $ref: '#/components/headers/RateLimitCurrentLimit'
        Retry-After:
          $ref: '#/components/headers/RateLimitRetryAfter'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - rate_limit_error
            example:
              object: error
              type: rate_limit_error
              message: Rate limit exceeded
              retryable: true
              doc_url: https://errors.rev.cat/rate-limit-error
              backoff_ms: 1000
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authentication_error
            example:
              object: error
              type: authentication_error
              message: Invalid API key
              retryable: false
              doc_url: https://errors.rev.cat/authentication-error
    UnprocessableEntity:
      description: Unprocessable entity
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - unprocessable_entity_error
                      - parameter_error
                      - store_error
          examples:
            unprocessable_entity:
              value:
                object: error
                type: unprocessable_entity_error
                message: Cannot delete a product that has purchases
                retryable: false
                doc_url: https://errors.rev.cat/unprocessable-entity-error
            parameter_error:
              value:
                object: error
                type: parameter_error
                message: Date must in the future
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            store_error:
              value:
                object: error
                type: store_error
                message: There was a problem on the App Store
                retryable: true
                doc_url: https://errors.rev.cat/store-error
                backoff_ms: 1000
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
x-tagGroups:
  - name: General
    tags:
      - Overview (v2)
      - Pagination
      - Rate Limit
      - Expandables
      - Error Handling
      - Representation of Subscriptions
  - name: Model Reference
    tags:
      - Subscription Data Model
  - name: Endpoint Reference
    tags:
      - App
      - Charts & Metrics
      - Customer
      - Entitlement
      - Offering
      - Package
      - Product
      - Purchase
      - Subscription
      - Invoice
      - Paywall
      - Project
openapi: 3.0.3
