Overview
What's New
Web Store
- Player Authentication
- Offers
- Offers V1 API
- Offers V2 API
- Personalization
- Webhooks
Checkout
- Checkout Session
- Orders
- Finance and Analytics
- Checkout Webhooks
Events Center
- Introduction
- Login Events
- Store Interaction Events
- Error Events
- Order Events
- Refund and Dispute Events
Popups V1 API
Create Post Purchase Popup
POST
/
offering
/
offer
/
popup
Copy
curl --request POST \
--url https://api-sandbox.appcharge.com/offering/offer/popup \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '{
"publisherOfferId": "offer1",
"name": "Test_PopUp",
"displayName": "<string>",
"description": "Best offer ever.",
"type": "PopUp",
"subType": "<string>",
"priority": 123,
"offerUiId": "64a55b82e06998282d3d9b59",
"offerExternalUiId": "b9c1e7a3d1f8b2a4c6e5d8f3",
"active": "true",
"startOver": true,
"triggers": [
{
"type": "event",
"eventName": "purchase",
"every": 123,
"rules": [
{
"fieldName": "publisherOfferId",
"operator": "in",
"value": [
"<string>"
]
}
]
}
],
"segments": "NewUser",
"productsSequence": [
{
"id": "<string>",
"index": 1,
"playerAvailability": 2,
"priceInUsdCents": 300,
"products": [
{
"quantity": 500,
"publisherProductId": "product1"
}
]
}
]
}'
Copy
{
"offerId": "655dc8a546822b3e7586b7b7",
"publisherOfferId": "offer1",
"name": "Test_PopUp",
"displayName": "<string>",
"description": "N/A",
"type": "PopUp",
"subType": "<string>",
"createdBy": "API",
"offerUi": {
"offerUiId": "6548afb2ed7ec741ac8dee3a",
"externalId": "<string>",
"active": "true",
"offerUiType": "PopUp",
"name": "test_offerUi",
"description": "Best Offer UI",
"backgroundImage": "https://media.appcharge.com/defaults/background.png",
"specialOffer": {
"templateType": "Single",
"presentOfferEndTimer": "false",
"title": "",
"fontSize": 18,
"fontWeight": "normal",
"fontColor": {
"colorOne": "black",
"colorTwo": "black",
"direction": "to right"
},
"backgroundColor": {
"colorOne": "black",
"colorTwo": "black",
"direction": "to right"
}
}
},
"active": "true",
"coolDownInHours": "1",
"segments": "[NewUser]",
"productsSequence": [
{
"index": 1,
"playerAvailability": 2,
"priceInUsdCents": 300,
"products": [
{
"quantity": 500,
"product": {
"publisherProductId": "product1",
"name": "test_product",
"textFontColorHex": "#FFFF",
"type": "Time",
"prefix": "100",
"suffix": "500",
"priority": "Main",
"images": [
{
"type": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-07-05T12:01:06.113Z",
"updatedAt": "2023-07-05T12:01:06.113Z",
"productId": "655dc8a546822b3e7586b7b7"
}
}
]
}
],
"startOver": true,
"priority": 123,
"showAfter": "<string>",
"triggers": [
{
"type": "event",
"eventName": "purchase",
"every": 123,
"rules": [
{
"fieldName": "publisherOfferId",
"operator": "in",
"value": [
"<string>"
]
}
]
}
],
"createdAt": "2023-07-05T12:01:06.113Z",
"updatedAt": "2023-07-05T12:01:06.113Z"
}
Headers
The publisher token
Body
application/json
Response
201
application/json
Create a new Offer
The response is of type object
.
Was this page helpful?
Copy
curl --request POST \
--url https://api-sandbox.appcharge.com/offering/offer/popup \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '{
"publisherOfferId": "offer1",
"name": "Test_PopUp",
"displayName": "<string>",
"description": "Best offer ever.",
"type": "PopUp",
"subType": "<string>",
"priority": 123,
"offerUiId": "64a55b82e06998282d3d9b59",
"offerExternalUiId": "b9c1e7a3d1f8b2a4c6e5d8f3",
"active": "true",
"startOver": true,
"triggers": [
{
"type": "event",
"eventName": "purchase",
"every": 123,
"rules": [
{
"fieldName": "publisherOfferId",
"operator": "in",
"value": [
"<string>"
]
}
]
}
],
"segments": "NewUser",
"productsSequence": [
{
"id": "<string>",
"index": 1,
"playerAvailability": 2,
"priceInUsdCents": 300,
"products": [
{
"quantity": 500,
"publisherProductId": "product1"
}
]
}
]
}'
Copy
{
"offerId": "655dc8a546822b3e7586b7b7",
"publisherOfferId": "offer1",
"name": "Test_PopUp",
"displayName": "<string>",
"description": "N/A",
"type": "PopUp",
"subType": "<string>",
"createdBy": "API",
"offerUi": {
"offerUiId": "6548afb2ed7ec741ac8dee3a",
"externalId": "<string>",
"active": "true",
"offerUiType": "PopUp",
"name": "test_offerUi",
"description": "Best Offer UI",
"backgroundImage": "https://media.appcharge.com/defaults/background.png",
"specialOffer": {
"templateType": "Single",
"presentOfferEndTimer": "false",
"title": "",
"fontSize": 18,
"fontWeight": "normal",
"fontColor": {
"colorOne": "black",
"colorTwo": "black",
"direction": "to right"
},
"backgroundColor": {
"colorOne": "black",
"colorTwo": "black",
"direction": "to right"
}
}
},
"active": "true",
"coolDownInHours": "1",
"segments": "[NewUser]",
"productsSequence": [
{
"index": 1,
"playerAvailability": 2,
"priceInUsdCents": 300,
"products": [
{
"quantity": 500,
"product": {
"publisherProductId": "product1",
"name": "test_product",
"textFontColorHex": "#FFFF",
"type": "Time",
"prefix": "100",
"suffix": "500",
"priority": "Main",
"images": [
{
"type": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-07-05T12:01:06.113Z",
"updatedAt": "2023-07-05T12:01:06.113Z",
"productId": "655dc8a546822b3e7586b7b7"
}
}
]
}
],
"startOver": true,
"priority": 123,
"showAfter": "<string>",
"triggers": [
{
"type": "event",
"eventName": "purchase",
"every": 123,
"rules": [
{
"fieldName": "publisherOfferId",
"operator": "in",
"value": [
"<string>"
]
}
]
}
],
"createdAt": "2023-07-05T12:01:06.113Z",
"updatedAt": "2023-07-05T12:01:06.113Z"
}
Assistant
Responses are generated using AI and may contain mistakes.