v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Offer Designs

Creates a post purchase popup design.

post/components/v1/offer-design

Request body

offerUiType'PopUp' required

Type of offer design.

namestring required

Offer design name.

externalIdstring required

Design ID that you define.

backgroundImageUrlstring url required

Background image URL in PNG or JPEG format.

For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs.

We recommend uploading image files instead of using external URLs when possible.

offerUiSubType'PostPurchase' required

Popup design subtype. Use PostPurchase for post purchase popup designs.

Example request

{
  "offerUiType": "PopUp",
  "name": "Post Purchase Popup Design",
  "externalId": "post-purchase-popup-design",
  "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
  "title": {
    "text": "Post purchase offer",
    "fontColor": "#FFFFFF",
    "fontSize": 20,
    "fontWeight": "medium"
  },
  "offerUiSubType": "PostPurchase"
}

Response

Offer design created successfully.

idstring

Design ID.

offerUiType'PopUp'

Type of offer design.

namestring

Offer design name.

externalIdstring

Design ID that you defined.

backgroundImageUrlstring url

Background image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL.

externalBackgroundImageUrlstring url

Original background image URL when the design uses an external image URL. This URL is used as provided to serve the image.

offerUiSubType'PostPurchase'

Popup design subtype. Use PostPurchase for post purchase popup designs.

Example response

{
  "id": "6a09aa1018b751228b09faed",
  "offerUiType": "PopUp",
  "name": "Post Purchase Popup Design",
  "externalId": "post-purchase-popup-design",
  "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
  "title": {
    "text": "Post purchase offer",
    "fontColor": "#FFFFFF",
    "fontSize": 20,
    "fontWeight": "medium"
  },
  "externalBackgroundImageUrl": "https://cdn.example.com/assets/background.png",
  "offerUiSubType": "PostPurchase"
}