curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic"
}
}'
curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}'
{
"id": "6909e7684f11e8957afd5d53",
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic",
"milestones": null
}
}
{
"id": "6909e7684f11e8957afd5d54",
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}
Progress Bars
Create Progress Bar Design
Creates a progress bar design.
When you create a progress bar design, progressBar.type defaults to classic. To create a milestones design, set progressBar.type to milestones and include the milestones object.
POST
/
components
/
v1
/
offer-design
curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic"
}
}'
curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}'
{
"id": "6909e7684f11e8957afd5d53",
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic",
"milestones": null
}
}
{
"id": "6909e7684f11e8957afd5d54",
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}
curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic"
}
}'
curl -X POST \
'https://api.appcharge.com/components/v1/offer-design' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
--data '{
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}'
{
"id": "6909e7684f11e8957afd5d53",
"offerUiType": "ProgressBar",
"name": "Classic Progress Bar Design",
"externalId": "progress-bar-design-classic",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Classic Progress Bar",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "classic",
"milestones": null
}
}
{
"id": "6909e7684f11e8957afd5d54",
"offerUiType": "ProgressBar",
"name": "Milestone Progress Bar Design",
"externalId": "progress-bar-design-milestones",
"backgroundImageUrl": "https://media.appcharge.com/defaults/background.png",
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#1a1a1a",
"gradientDirection": "to right"
},
"backgroundOpacity": 100,
"frameRadius": 8,
"headerImageUrl": "https://example.com/header.png",
"title": {
"text": "Reach Every Milestone",
"fontColor": "#FFD700",
"fontSize": 10,
"fontWeight": "bold"
},
"subtitle": {
"text": "Collect rewards along the way",
"fontColor": "#FFD700",
"fontSize": 8,
"fontWeight": "medium"
},
"progressBar": {
"barFillColor": {
"colorOne": "#FFD700",
"colorTwo": "#FFA500",
"gradientDirection": "to right"
},
"borderColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#3a3a3a",
"gradientDirection": "to right"
},
"borderWidth": 3,
"barRadius": 4,
"backgroundColor": {
"colorOne": "#1a1a1a",
"colorTwo": "#111111",
"gradientDirection": "to bottom"
},
"textColor": "#FFD700",
"accumulatedItem": {
"imageUrl": "https://example.com/item.png",
"ribbonImageUrl": "https://example.com/ribbon.png"
},
"type": "milestones",
"milestones": {
"milestoneCompletedIconUrl": "https://example.com/checkmark.png",
"tooltipBackgroundColor": "#1f9eec"
}
}
}
Body
application/json
Creates a progress bar design.
Response
Offer design created successfully.
Was this page helpful?
