CREATE
Use POST method to create new subordinate resources.
Example request URIs
[POST] https://{{kiwire_ip}}/api/campaign/
Parameters Required
Parameter |
Value |
Description |
tenant_id |
string |
Tenant ID or Tenant name of the API key |
updated_date |
datetime |
The last updated date and time |
name |
string |
The name of the campaign. |
status |
Active or Disabled |
The status of the campaign whether active or disabled. |
date_start |
DateTime |
Start date of the campaign. |
date_end |
DateTime |
End date of the campaign. |
c_order |
integer |
- The ordering of campaign by priority from “1-10” whereby “1” is the first campaign displayed for users when the campaign loads.
- Assign “0” for all campaigns if you wish to load random campaign order each time a user campaign is triggered.
- Priority will be given to numbered sort order campaigns if there is a mix of random sort order assigned.
|
remark |
string |
Remark for the campaign. |
expired_click |
integer |
The campaign will stop running upon reaching the number of clicks defined.
* NOTE : Blank or 0 for unlimited clicks. |
expired_impress |
integer |
The campaign will stop running upon reaching the number of impressions defined.
* NOTE : Blank or 0 for unlimited impressions. |
target |
string |
This option will enable you to target your campaign to
- All : To target all users
- Specific Persona : Select the specific persona to target campaign
- Specific Zone : Select the zone that campaign will run on.
|
c_interval |
string |
Interval is the time period when campaign will run.
- Always
- Specific Time Frame
|
c_trigger |
string |
- Connect :The trigger for the campaign.
- Login :The campaign will run on user 1st time connected to the network before the login.
- 1st Connect :The campaign will be run on user login into the network.
- Disconnect :The campaign will be run on user 1st time login to network.
- Dwell :The campaign will be run on user disconnected from the network.
- Recurring :The campaign will run on user dwell time more than campaign define minutes (min 30 mins).
- Milestone :When user login the define recurring no of user will run this campaign.
- Last visit :The campaign will run when user login the define milestone no.
- The campaign will apply on all user who last visit is more than defined days.
|
action |
string |
This option will enable your campaign to
- Display Ads : The campaign will display ads to user, from the ads library.
* NOTE : Display ADS will only work on Trigger (Connect, Login,1st Login, Recurring and Milestone).
- Send Notification : Send SMS, Email or trigger API when the campaign is executed. Type the message into the Notify Message.
- Redirect to URL : The campaign will redirect user to a URL.
* NOTE : This will only work on Trigger (Connect, Login,1st Login, Recurring and Milestone).
|
PATCH
Use PATCH method is to make a partial update on a resource.
The differences between PATCH and PUT, PUT method also modify a resource entity but PATCH method is used for partially updating an existing resource. PUT should be used if you are entirety replacing a resource.
Example request URIs
[PATCH] https://{{kiwire_ip}}/api/campaign/{{id}}/
Parameters Required
Parameter |
Value |
Description |
tenant_id |
string |
Tenant ID or Tenant name of the API key |
updated_date |
datetime |
The last updated date and time |
name |
string |
The name of the campaign. |
status |
Active or Disabled |
The status of the campaign whether active or disabled. |
date_start |
DateTime |
Start date of the campaign. |
date_end |
DateTime |
End date of the campaign. |
c_order |
integer |
- The ordering of campaign by priority from “1-10” whereby “1” is the first campaign displayed for users when the campaign loads.
- Assign “0” for all campaigns if you wish to load random campaign order each time a user campaign is triggered.
- Priority will be given to numbered sort order campaigns if there is a mix of random sort order assigned.
|
remark |
string |
Remark for the campaign. |
expired_click |
integer |
The campaign will stop running upon reaching the number of clicks defined.
* NOTE : Blank or 0 for unlimited clicks. |
expired_impress |
integer |
The campaign will stop running upon reaching the number of impressions defined.
* NOTE : Blank or 0 for unlimited impressions. |
target |
string |
This option will enable you to target your campaign to
- All : To target all users
- Specific Persona : Select the specific persona to target campaign
- Specific Zone : Select the zone that campaign will run on.
|
c_interval |
string |
Interval is the time period when campaign will run.
- Always
- Specific Time Frame
|
c_trigger |
string |
- Connect :The trigger for the campaign.
- Login :The campaign will run on user 1st time connected to the network before the login.
- 1st Connect :The campaign will be run on user login into the network.
- Disconnect :The campaign will be run on user 1st time login to network.
- Dwell :The campaign will be run on user disconnected from the network.
- Recurring :The campaign will run on user dwell time more than campaign define minutes (min 30 mins).
- Milestone :When user login the define recurring no of user will run this campaign.
- Last visit :The campaign will run when user login the define milestone no.
- The campaign will apply on all user who last visit is more than defined days.
|
action |
string |
This option will enable your campaign to
- Display Ads : The campaign will display ads to user, from the ads library.
* NOTE : Display ADS will only work on Trigger (Connect, Login,1st Login, Recurring and Milestone).
- Send Notification : Send SMS, Email or trigger API when the campaign is executed. Type the message into the Notify Message.
- Redirect to URL : The campaign will redirect user to a URL.
* NOTE : This will only work on Trigger (Connect, Login,1st Login, Recurring and Milestone).
|
DELETE
Use DELETE method as the name applies to delete resources.
Example request URIs
[DELETE] https://{{kiwire_ip}}/api/campaign/{{id}}/
GET
Use GET method to retrieve resource information only and not to modify it in any way.
Example request URIs
[GET] https://{{kiwire_ip}}/api/campaign/
[GET] https://{{kiwire_ip}}/api/campaign/{{id}}/
[GET] https://{{kiwire_ip}}/api/campaign/{{offset}}/{{limit}}/{{column}}/{{order}}/
|
Value |
Description |
offset |
integer |
Start data count |
limit |
integer |
Limit data count |
column |
string |
Column name |
order |
desc or asc |
Sort the result set in ascending or descending order. |
For GET method, if {{offset}}, {{limit}}, {{column}}, and {{order}} not provided then Kiwire will return default value eg :
https://{{kiwire_ip}}/api/campaign/0/10/id/desc/