> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appcharge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Rolling Offer



## OpenAPI

````yaml POST /offering/rolling-offer
openapi: 3.0.1
info:
  title: Rolling Offer API
  description: API for managing Rolling Offers.
  version: '1.0'
servers:
  - url: https://api-sandbox.appcharge.com
security: []
paths:
  /offering/rolling-offer:
    post:
      tags:
        - Rolling Offers
      summary: Create a new rolling offer
      operationId: createRollingOffer
      parameters:
        - name: x-publisher-token
          in: header
          required: true
          description: The publisher token used for authentication.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRollingOfferDto'
      responses:
        '201':
          description: Rolling offer created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RollingOfferDtoResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
components:
  schemas:
    CreateRollingOfferDto:
      type: object
      required:
        - publisherOfferId
        - name
        - type
        - active
        - productsSequence
      properties:
        publisherOfferId:
          type: string
          description: The unique identifier for the rolling offer.
        name:
          type: string
          description: The name of the rolling offer (at least 3 characters).
        type:
          type: string
          description: The type of offer - RollingOffer.
          enum:
            - RollingOffer
        active:
          type: boolean
          description: Whether the rolling offer is active.
        priority:
          type: integer
          description: >-
            The priority level of the rolling offer. The priority starts from 1
            and 1 is the highest priority.
        offerUiId:
          type: string
          description: >-
            Internal ID for the Offer UI (required if offerExternalUiId not
            provided).
        offerExternalUiId:
          type: string
          description: The external UI ID for the rolling offer.
        segments:
          type: array
          description: List of player segments that this rolling offer applies to.
          items:
            type: string
        productsSequence:
          type: array
          description: >-
            The sequence of products included in the rolling offer. At least 2
            productsSequences should be added.
          items:
            type: object
            properties:
              index:
                type: integer
                description: The order of the product in the rolling offer.
              products:
                type: array
                description: Max 3 products can be added to each productsSequence.
                items:
                  type: object
                  properties:
                    publisherProductId:
                      type: string
                      description: The unique ID of the product.
                    quantity:
                      type: integer
                      description: The quantity of the product in the rolling offer.
              priceInUsdCents:
                type: integer
                description: The price of the product in cents.
              priceDiscount:
                type: object
                description: Discount applied to the product.
                properties:
                  discount:
                    type: integer
                  type:
                    type: string
                    enum:
                      - percentage
                      - fixed_amount
              productSale:
                type: object
                description: Sale details for the product.
                properties:
                  sale:
                    type: integer
                  type:
                    type: string
                    enum:
                      - percentage
                      - fixed_amount
              badges:
                type: array
                items:
                  type: object
                  properties:
                    publisherBadgeId:
                      type: string
                      description: The unique identifier of the badge.
        schedule:
          type: object
          description: The schedule for when the rolling offer is available.
          properties:
            permanent:
              type: boolean
            timeFrames:
              type: array
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    format: date-time
                  endTime:
                    type: string
                    format: date-time
                  notes:
                    type: string
                required:
                  - startTime
                  - endTime
    RollingOfferDtoResponse:
      type: object
      properties:
        publisherOfferId:
          type: string
          description: The unique identifier for the rolling offer.
        offerId:
          type: string
          description: The unique identifier of the rolling offer.
        name:
          type: string
          description: The name of the rolling offer.
        type:
          type: string
          description: The type of rolling offer.
        active:
          type: boolean
          description: Whether the rolling offer is active.
        priority:
          type: integer
          description: The priority level of the rolling offer.
        segments:
          type: array
          items:
            type: string
          description: The player segments associated with the rolling offer.
        offerUi:
          type: object
          properties:
            offerUiId:
              type: string
              description: Internal ID for the Offer UI.
            offerUIType:
              type: string
              description: Type of the offer UI.
            description:
              type: string
              description: Description of the rolling offer.
            backgroundImage:
              type: string
              description: Background image URL for the offer UI.
            borderColor:
              type: object
              additionalProperties:
                type: string
              description: Border color used in the offer UI.
            borderWidth:
              type: integer
              description: Width of the border in the offer UI.
            externalId:
              type: string
              description: External identifier for the rolling offer.
        productsSequence:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                description: The sequence index of the product.
              priceInUsdCents:
                type: integer
                description: The price of the product in cents.
              products:
                type: array
                items:
                  type: object
                  properties:
                    publisherProductId:
                      type: string
                    quantity:
                      type: integer
              badges:
                type: array
                items:
                  type: object
                  properties:
                    publisherBadgeId:
                      type: string
        schedule:
          type: object
          properties:
            permanent:
              type: boolean
              default: true
            timeFrames:
              type: array
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    format: date-time
                  endTime:
                    type: string
                    format: date-time
                  notes:
                    type: string
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the rolling offer was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the rolling offer was last updated.

````