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"
}
}
}
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.
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"
}
}
}
Headers
Publisher token, as displayed in the Publisher Dashboard.
Body
Creates a progress bar design.
Offer design type.
ProgressBar "ProgressBar"
Offer design name.
"Classic Progress Bar Design"
External identifier for the offer design.
"progress-bar-design-classic"
Opacity of the progress bar frame's backgroundColor (0 to 100). If you use backgroundImageUrl for the frame background, this value has no effect but must still be passed.
100
Radius of the progress bar frame.
8
Progress bar configuration.
Show child attributes
Show child attributes
Background image URL of the progress bar frame. Required if backgroundColor isn't provided.
"https://media.appcharge.com/defaults/background.png"
Background color of the progress bar frame. Required if backgroundImageUrl isn't provided.
To use a solid color, pass the same value for colorOne and colorTwo.
Show child attributes
Show child attributes
Header image URL.
"https://cdn.example.com/header.png"
Progress bar title.
Show child attributes
Show child attributes
Progress bar subtitle.
Show child attributes
Show child attributes
Response
Offer design created successfully.
Offer Design ID.
"6909e7684f11e8957afd5d53"
Offer design type.
ProgressBar "ProgressBar"
Offer design name.
"Classic Progress Bar Design"
External identifier for the offer design.
"progress-bar-design-classic"
Background image URL of the progress bar frame.
"https://media.appcharge.com/defaults/background.png"
Background color of the progress bar frame. Required if backgroundImageUrl isn't provided.
To use a solid color, pass the same value for colorOne and colorTwo.
Show child attributes
Show child attributes
Opacity of the progress bar frame's backgroundColor (0 to 100).
100
Radius of the progress bar frame.
8
Header image URL.
"https://cdn.example.com/header.png"
Progress bar title.
Show child attributes
Show child attributes
Progress bar subtitle.
Show child attributes
Show child attributes
Progress bar configuration.
Show child attributes
Show child attributes
Was this page helpful?
