Push Notification API Campaigns

API Types

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/
Indian IDC: api1-in.netcoresmartech.com/campaign/

EndpointRequest TypeWhat it Does?
/createPOSTSend campaign creation details to the server, which stores it as a campaign
/executePOSTAssign an audience to a successfully created campaign.

Header:

KeyValue
AuthorizationAPI_KEY
Content-Typeapplication/json

🚧

Prerequisites

For implementing APN campaign APIs, it is a prerequisite that the client has the smartech SDK integrated in their apps.

Create APN Campaign

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/create
Indian IDC: api1-in.netcoresmartech.com/campaign/create
Method:POST
Parameters:

ParameterDescriptionData TypeRequired
typeThis is the Campaign Type.
Will have ‘apn’, as this is API is for campaign creation.
StringYes
app_idApp IDs of the mobile assets.ArrayYes
nameName of the CampaignStringOptional
template_idID of the template usedStringOptional
tagsTags the user wants to assign to the campaignArrayOptional

Request Body:

{
    "type": "apn" ,  
    "app_ids" : ["1234679jbwdclc67akj","1234679jbwdclc67akj"], // Max 5 appids are allowed
    "name" : "<campaignName>",
    "template_id": "<templateId>",
    "tags" : ["Sale","Brand"], //Optional Max 5 tags, each tag min 5 and max 25
    }
}

Response:

{
    "status": "success",
    "message": "Campaign created successfully",
    "campaign_id" : 10001
}

Execute APN Campaign

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/execute
Indian IDC: api1-in.netcoresmartech.com/campaign/execute
Method:POST
Parameters:

ParameterDescriptionData TypeRequired
typeThis is the Campaign Type.
Will have ‘apn’, as this is API is for campaign creation
StringYes
campaign_idThis is the ID of the successfully created campaign created that you receive as a response of the create campaign AP.StringYes
data_sourceThe type of audience selection that you have chosen. (segment/list)StringYes
frequency_cappingWhether the user wants to frequency cap the campaign sent out.(yes/no)StringYes

📘

Data Source

Data Sources in the execution API currently supported are Lists and Segments. The data sources specify the audience to which the campaign has to be sent out.

Request Body:

{
    "type":"apn",
    "campaign_id" : 123 ,//Provided after successful execution of campaign creation API
    "data_source": "segment" or "list",
    "frequency_capping" : "false", //default panel setting value
    "list_id":"<listId>"
}
OR
{
    "type": "apn",
    "campaign_id": 123,
    "data_source": "segment",
    "frequency_capping" : "true",
    "segment_id":"<segmentId>"
}

Response:

{
    "status": "success",
    "message": "Request received successfully",
    "request_id" : 10001
}