Campaign
Set of endpoints used for the campaign creation/modification/lists.
Create
Create Campaign from Template Campaign
POST /api/create-or-update-campaign
Auth [Identifier], Scope [User]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
name | yes | string | ||
template_campaign_id | yes | integer | ||
login_options | json | |||
ssid | string | |||
text_color | string | |||
background | string | |||
footer_text | string | |||
title_text | string | |||
custom_terms | string | |||
redirect_url | string | |||
login_facebook | string | 0,1 | ||
login_custom | string | 0,1 | ||
login_twitter | string | 0,1 | ||
login_instagram | string | 0,1 | ||
login_linkedin | string | 0,1 |
Notes:
name
The name must be alphanumerictemplate_campaign_id
The template_campaign_id must be an existing campaignlogin_options
The login_options must be a validated JSON payload of the appropriate login options that will override all login_* parameters passed belowssid
The ssid must be alphanumeric, the “#” symbol may also be usedtext_color
The text_color is the hex code for the colour of the text that appears on the login page (without the leading # sign)background
The background is the hex code for the colour of the background (without the leading # sign)footer_text
The footer_text must be a stringtitle_text
The title_text must be a stringcustom_terms
The custom_terms must be a string, and does accept html markupredirect_url
The redirect_url must be a proper URL format (including http/https)login_facebook
The login_facebook must be [1 / 0] - false if you want to not include this login optionlogin_custom
The login_custom must be [1 / 0] - 0 if you want to not include this login optionlogin_twitter
The login_twitter must be [1 / 0] - 0 if you want to not include this login optionlogin_instagram
The login_instagram must be [1 / 0] - 0 if you want to not include this login optionlogin_linkedin
The login_inkedin must be [1 / 0] - 0 if you want to not include this login option
Success [200]
{
"status": "success",
"data": [
"id": "[campaign-id]",
"name": "[Campaign Name]",
"ssid": "[SSID]",
"payload": "[Campaign JSON Payload]",
"date_created": "[datetime]",
"last_modified": "[datetime]",
"deleted": "[0|1]"
]
}
Error [400]
{
"status": "success",
"message": "Campaign has been created successfully.",
"campaign_id": [campaign_id],
"campaign_filename": "[campaign_filename]"
}
Update
Update Campaign
POST /api/create-or-update-campaign
Auth [Identifier], Scope [Campaign]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
name | yes | string | ||
campaign_id | yes | integer | ||
login_options | json | |||
ssid | string | |||
text_color | string | |||
background | string | |||
footer_text | string | |||
title_text | string | |||
custom_terms | string | |||
redirect_url | string | |||
login_facebook | string | 0,1 | ||
login_custom | string | 0,1 | ||
login_twitter | string | 0,1 | ||
login_instagram | string | 0,1 | ||
login_linkedin | string | 0,1 |
Notes:
name
The name must be alphanumericcampaign_id
The campaign_id must be an existing campaignlogin_options
The login_options must be a validated JSON payload of the appropriate login options that will override all login_* parameters passed belowssid
The ssid must be alphanumeric, the “#” symbol may also be usedtext_color
The text_color is the hex code for the colour of the text that appears on the login page (without the leading # sign)background
The background is the hex code for the colour of the background (without the leading # sign)footer_text
The footer_text must be a stringtitle_text
The title_text must be a stringcustom_terms
The custom_terms must be a string, and does accept html markupredirect_url
The redirect_url must be a proper URL format (including http/https)login_facebook
The login_facebook must be [1 / 0] - false if you want to not include this login optionlogin_custom
The login_custom must be [1 / 0] - 0 if you want to not include this login optionlogin_twitter
The login_twitter must be [1 / 0] - 0 if you want to not include this login optionlogin_instagram
The login_instagram must be [1 / 0] - 0 if you want to not include this login optionlogin_linkedin
The login_inkedin must be [1 / 0] - 0 if you want to not include this login option
Success [200]
{
"status": "success",
"message": "Campaign has been updated successfully.",
"campaign_id": [campaign_id],
"campaign_filename": "[campaign_filename]"
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Retrieve
Retrieve data for multiple or single Campaign(s)
GET /api/get-campaign
Auth [Identifier], Scope [Campaign]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
campaign_ids | yes | string |
Notes:
campaign_ids
The campaign_ids must be either a single campaign_id integer or a comma separated list of campaign_ids [maximum 10 campaign_ids]
Success [200]
{
"status": "success",
"data": [
"id": "[campaign-id]",
"name": "[Campaign Name]",
"ssid": "[SSID]",
"payload": "[Campaign JSON Payload]",
"date_created": "[datetime]",
"last_modified": "[datetime]",
"deleted": "[0|1]"
]
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Delete
Delete Campaign
POST /api/delete-campaign
Auth [Identifier], Scope [Campaign]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
campaign_id | yes | integer |
Notes:
campaign_id
The campaign_id must be a Campaign ID# from the MyWiFi Dashboard
Success [200]
{
"status": "success",
"message": "Campaign has been successfully deleted."
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}