Skip to main content
POST
/
offering
/
rolling-offer
Create a new rolling offer
curl --request POST \
  --url https://api-sandbox.appcharge.com/offering/rolling-offer \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <x-publisher-token>' \
  --data '{
  "publisherOfferId": "<string>",
  "name": "<string>",
  "type": "RollingOffer",
  "active": true,
  "priority": 123,
  "offerUiId": "<string>",
  "offerExternalUiId": "<string>",
  "segments": [
    "<string>"
  ],
  "productsSequence": [
    {
      "index": 123,
      "products": [
        {
          "publisherProductId": "<string>",
          "quantity": 123
        }
      ],
      "priceInUsdCents": 123,
      "priceDiscount": {
        "discount": 123,
        "type": "percentage"
      },
      "productSale": {
        "sale": 123,
        "type": "percentage"
      },
      "badges": [
        {
          "publisherBadgeId": "<string>"
        }
      ]
    }
  ],
  "schedule": {
    "permanent": true,
    "timeFrames": [
      {
        "startTime": "2023-11-07T05:31:56Z",
        "endTime": "2023-11-07T05:31:56Z",
        "notes": "<string>"
      }
    ]
  }
}'
{
  "publisherOfferId": "<string>",
  "offerId": "<string>",
  "name": "<string>",
  "type": "<string>",
  "active": true,
  "priority": 123,
  "segments": [
    "<string>"
  ],
  "offerUi": {
    "offerUiId": "<string>",
    "offerUIType": "<string>",
    "description": "<string>",
    "backgroundImage": "<string>",
    "borderColor": {},
    "borderWidth": 123,
    "externalId": "<string>"
  },
  "productsSequence": [
    {
      "index": 123,
      "priceInUsdCents": 123,
      "products": [
        {
          "publisherProductId": "<string>",
          "quantity": 123
        }
      ],
      "badges": [
        {
          "publisherBadgeId": "<string>"
        }
      ]
    }
  ],
  "schedule": {
    "permanent": true,
    "timeFrames": [
      {
        "startTime": "2023-11-07T05:31:56Z",
        "endTime": "2023-11-07T05:31:56Z",
        "notes": "<string>"
      }
    ]
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Headers

x-publisher-token
string
required

The publisher token used for authentication.

Body

application/json
publisherOfferId
string
required

The unique identifier for the rolling offer.

name
string
required

The name of the rolling offer (at least 3 characters).

type
enum<string>
required

The type of offer - RollingOffer.

Available options:
RollingOffer
active
boolean
required

Whether the rolling offer is active.

productsSequence
object[]
required

The sequence of products included in the rolling offer. At least 2 productsSequences should be added.

priority
integer

The priority level of the rolling offer. The priority starts from 1 and 1 is the highest priority.

offerUiId
string

Internal ID for the Offer UI (required if offerExternalUiId not provided).

offerExternalUiId
string

The external UI ID for the rolling offer.

segments
string[]

List of player segments that this rolling offer applies to.

schedule
object

The schedule for when the rolling offer is available.

Response

Rolling offer created successfully.

publisherOfferId
string

The unique identifier for the rolling offer.

offerId
string

The unique identifier of the rolling offer.

name
string

The name of the rolling offer.

type
string

The type of rolling offer.

active
boolean

Whether the rolling offer is active.

priority
integer

The priority level of the rolling offer.

segments
string[]

The player segments associated with the rolling offer.

offerUi
object
productsSequence
object[]
schedule
object
createdAt
string<date-time>

Timestamp when the rolling offer was created.

updatedAt
string<date-time>

Timestamp when the rolling offer was last updated.

I