info:
  title: Developer API
  version: 2.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
openapi: 3.0.3
tags:
  - name: Virtual Currency
    description: Operations about virtual currencies.
paths:
  /projects/{project_id}/virtual_currencies:
    get:
      summary: Get a list of virtual currencies
      operationId: list-virtual-currencies
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read
      x-release-status: public
      tags:
        - Virtual Currency
      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
          description: >-
            Pagination cursor. Pass the id of the last item from the previous
            page to fetch the next page; omit for the first page.
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of items to return per page. Values below 1 or above
            100 are clamped to that range rather than rejected.
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVirtualCurrencies'
          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'
        '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:virtual_currencies:read</code>. This
        endpoint belongs to the <strong>Project Configuration</strong> domain,
        which has a default rate limit of <strong>60 requests per
        minute</strong>.
    post:
      summary: Create a virtual currency
      operationId: create-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read_write
      x-release-status: public
      tags:
        - Virtual Currency
      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:
                - code
                - name
              properties:
                code:
                  description: The unique code for this virtual currency
                  type: string
                  minLength: 1
                  maxLength: 10
                  pattern: ^[a-zA-Z0-9_]+$
                  example: GLD
                name:
                  description: The display name of the virtual currency
                  type: string
                  minLength: 1
                  maxLength: 50
                  example: Gold
                description:
                  description: Description of the virtual currency
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Gold currency used in the game
                product_grants:
                  description: >-
                    Product grants that define how products grant this virtual
                    currency
                  nullable: true
                  type: array
                  items:
                    $ref: '#/components/schemas/VirtualCurrencyProductGrantInput'
              additionalProperties: false
      responses:
        '201':
          description: Success. The virtual currency was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCurrency'
          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:virtual_currencies:read_write</code>. This
        endpoint belongs to the <strong>Project Configuration</strong> domain,
        which has a default rate limit of <strong>60 requests per
        minute</strong>.
  /projects/{project_id}/virtual_currencies/{virtual_currency_code}:
    get:
      summary: Get a virtual currency
      operationId: get-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read
      x-release-status: public
      tags:
        - Virtual Currency
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: virtual_currency_code
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 10
            pattern: ^[a-zA-Z0-9_]+$
          description: The virtual currency code
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCurrency'
          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'
        '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:virtual_currencies:read</code>. This
        endpoint belongs to the <strong>Project Configuration</strong> domain,
        which has a default rate limit of <strong>60 requests per
        minute</strong>.
    post:
      summary: Update a virtual currency
      operationId: update-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read_write
      x-release-status: public
      tags:
        - Virtual Currency
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: virtual_currency_code
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 10
            pattern: ^[a-zA-Z0-9_]+$
          description: The virtual currency code
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the virtual currency
                  type: string
                  minLength: 1
                  maxLength: 50
                  example: Gold
                description:
                  description: Description of the virtual currency
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Gold currency used in the game
                product_grants:
                  description: >-
                    Product grants that define how products grant this virtual
                    currency
                  nullable: true
                  type: array
                  items:
                    $ref: '#/components/schemas/VirtualCurrencyProductGrantInput'
              additionalProperties: false
      responses:
        '200':
          description: Success. The virtual currency was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCurrency'
          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:virtual_currencies:read_write</code>. This
        endpoint belongs to the <strong>Project Configuration</strong> domain,
        which has a default rate limit of <strong>60 requests per
        minute</strong>.
    delete:
      summary: Delete a virtual currency
      operationId: delete-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read_write
      x-release-status: public
      tags:
        - Virtual Currency
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: virtual_currency_code
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 10
            pattern: ^[a-zA-Z0-9_]+$
          description: The virtual currency code
      responses:
        '200':
          description: Success. The virtual currency was deleted
          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:virtual_currencies:read_write</code>. This
        endpoint belongs to the <strong>Project Configuration</strong> domain,
        which has a default rate limit of <strong>60 requests per
        minute</strong>.
  /projects/{project_id}/virtual_currencies/{virtual_currency_code}/actions/archive:
    post:
      summary: Archive a virtual currency
      operationId: archive-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read_write
      x-release-status: public
      description: |-
        Archives a virtual currency (makes it inactive).
         This endpoint requires the following permission(s): <code>project_configuration:virtual_currencies:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Virtual Currency
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: virtual_currency_code
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 10
            pattern: ^[a-zA-Z0-9_]+$
          description: The virtual currency code
      responses:
        '200':
          description: Success. The virtual currency was archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCurrency'
          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'
  /projects/{project_id}/virtual_currencies/{virtual_currency_code}/actions/unarchive:
    post:
      summary: Unarchive a virtual currency
      operationId: unarchive-virtual-currency
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:virtual_currencies:read_write
      x-release-status: public
      description: |-
        Unarchives a virtual currency (makes it active).
         This endpoint requires the following permission(s): <code>project_configuration:virtual_currencies:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Virtual Currency
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: virtual_currency_code
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 10
            pattern: ^[a-zA-Z0-9_]+$
          description: The virtual currency code
      responses:
        '200':
          description: Success. The virtual currency was unarchived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCurrency'
          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'
components:
  schemas:
    ListVirtualCurrencies:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: VirtualCurrencyList
      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/VirtualCurrency'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's virtual currencies. If
            not present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/virtual_currencies?starting_after=GLD
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/virtual_currencies
      additionalProperties: false
    VirtualCurrencyProductGrantInput:
      type: object
      required:
        - product_ids
        - amount
      properties:
        product_ids:
          description: The list of product IDs that grant this virtual currency
          type: array
          minItems: 1
          items:
            type: string
            minLength: 1
            maxLength: 255
            example: prode1a2b3c4d5
        amount:
          description: The amount of virtual currency granted
          type: integer
          minimum: 1
          example: 100
        trial_amount:
          description: The amount of virtual currency granted during trial period
          nullable: true
          type: integer
          minimum: 0
          example: 0
        expire_at_cycle_end:
          description: Whether the grant expires at the end of the subscription cycle
          nullable: true
          type: boolean
          example: false
      additionalProperties: false
    VirtualCurrency:
      type: object
      required:
        - project_id
        - code
        - name
        - state
        - created_at
        - object
      properties:
        state:
          description: Whether the virtual currency is active or inactive (archived).
          nullable: false
          type: string
          enum:
            - active
            - inactive
          example: active
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - virtual_currency
          type: string
        project_id:
          description: ID of the project to which the virtual currency belongs
          nullable: false
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        code:
          description: The unique code for this virtual currency
          nullable: false
          type: string
          minLength: 1
          maxLength: 10
          pattern: ^[a-zA-Z0-9_]+$
          example: GLD
        name:
          description: The display name of the virtual currency
          nullable: false
          type: string
          minLength: 1
          maxLength: 50
          example: Gold
        created_at:
          description: The date the virtual currency was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        description:
          description: Description of the virtual currency
          nullable: true
          type: string
          minLength: 1
          maxLength: 1500
          example: Gold currency used in the game
        product_grants:
          description: The grants that define how products grant this virtual currency
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/VirtualCurrencyProductGrant'
      additionalProperties: false
    DeletedObject:
      type: object
      required:
        - object
        - id
        - deleted_at
      properties:
        object:
          description: The type of the deleted object
          enum:
            - app
            - chart_annotation
            - customer
            - discount
            - entitlement
            - experiment
            - offering
            - package
            - paywall
            - product
            - virtual_currency
            - webhook_integration
          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
      additionalProperties: false
    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
            - entity_references_archived_entities
          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
        referenced_object_ids:
          description: >-
            The IDs of related objects relevant to the error, such as the
            archived entities that need to be made active before the operation
            can succeed.
          type: array
          items:
            type: string
          example:
            - prodabcd1234
            - prodwxyz5678
      additionalProperties: false
    VirtualCurrencyProductGrant:
      type: object
      required:
        - object
        - product_ids
        - amount
        - trial_amount
        - expire_at_cycle_end
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - virtual_currency.product_grant
          type: string
        product_ids:
          description: The list of product IDs that grant this virtual currency
          type: array
          minItems: 1
          items:
            type: string
            minLength: 1
            maxLength: 255
            example: prode1a2b3c4d5
        amount:
          description: The amount of virtual currency granted
          type: integer
          minimum: 1
          example: 100
        trial_amount:
          description: The amount of virtual currency granted during trial period
          nullable: false
          type: integer
          minimum: 0
          example: 0
        expire_at_cycle_end:
          description: Whether the grant expires at the end of the subscription cycle
          nullable: false
          type: boolean
          example: false
      additionalProperties: false
  headers:
    RateLimitCurrentUsage:
      required: true
      description: >-
        The current number of requests used for the current limit (including the
        current request).
      schema:
        type: integer
      example: 25
    RateLimitCurrentLimit:
      required: true
      description: The rate limit for this endpoint, expressed in requests per minute.
      schema:
        type: integer
      example: 30
    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
    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
    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
    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
    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
    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
    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
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_already_exists
                      - idempotency_error
                      - invalid_request
          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
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Request conflicts with the current resource state
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    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
                      - entity_references_archived_entities
          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
            entity_references_archived_entities:
              value:
                object: error
                type: entity_references_archived_entities
                message: >-
                  This offering references inactive products. You will need to
                  make the products active first before making the offering
                  active.
                retryable: false
                doc_url: https://errors.rev.cat/entity-references-archived-entities
                referenced_object_ids:
                  - prodabcd1234
                  - prodwxyz5678
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
