SparkFly Campaign Create Guide

This document indends to describe to a third party how to create a campaign using SparkFly's web API. The following will be detailed in the sections below:

For a detailed API reference, please visit the Platform API section.

Overview

When creating a campaign through the SparkFly API, an existing parent offer can be specified to use for the campaign. If an offer is not supplied then the API call will create an offer using the default setting from the user's account preferences.

Campaign Management and Control Flow

In order to create a campaign an authentication token must first be retieved through SparkFly's authentication API. For a more detailed description on how to authenticate please refer to the Auth section in the Platform API documentation.

Creating a campaign

URL

POST https://api-staging.sparkfly.com/v1.0/campaigns

Headers

{
   "Content-Type": "application/json",
   "X-Auth-Token": "AUTH-TOKEN"
}

Body

In the body below, the offer_id field can be optionally supplied if the user wishes to use default account level settings for the offer

{
   "campaign": {
      "offer_id": 0,
      "code_ref": "string",
      "code_count": "string",
      "external_id": "string",
      "pos_offer_code": "string",
      "channel_name": "string",
      "stop_display_at": "stringified time",
      "start_display_at": "stringified time",
      "funding_source": "string",
      "eligible_store_numbers": [ "string array"],
      "eligible_storelist_numbers": ["string array"],
      "description_template_id": "string",
      "landing_page_image_template_id": "string",
      "terms_and_conditions_template_id": "string",
      "generate_reusable_codes": true,
      "allow_return_later": true,
      "security": "string"
   }
}

Response

{
    "campaign": {
        "id": 0,
        "xid": "string",
        "code_ref": "string",
        "external_id": "string",
        "channel_name": "string",
        "pos_offer_code": "string",
        "start_display_at": "stringified time",
        "stop_display_at": "stringified time",
        "funding_source": "string",
        "eligible_store_numbers": ["string array"],
        "eligible_storelist_numbers": ["string array"],
        "landing_page_image_template_id": "string",
        "description_template_id": "string",
        "terms_and_conditions_template_id": "string",
        "security": "string",
        "landing_page_urls": {
            "store": {},
            "storelist": {},
            "url": "string"
        },
        "allow_return_later": true,
        "redemption_identifier_type": 4
    },
    "errors": {}
}