[
  {
    "type": "post",
    "url": "/oauth/token",
    "title": "Get access token",
    "version": "0.1.0",
    "name": "GetOauthAccess",
    "group": "Access",
    "permission": [
      {
        "name": "Advertiser Publisher"
      }
    ],
    "description": "<p>To get access, please get in touch with your representative.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/x-www-form-urlencoded&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "grant_type",
            "description": "<p>&quot;client_credentials&quot;</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "client_id",
            "description": "<p>Client's users id</p>"
          },
          {
            "group": "Body",
            "type": "String(40)",
            "optional": false,
            "field": "client_secret",
            "description": "<p>Client's secret id</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get access token",
        "content": "curl -X POST \\\n     -H \"Content-Type: application/x-www-form-urlencoded\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d 'grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>'\n     'https://api.revcontent.io/oauth/token'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "access_token",
            "description": "<p>User unique access token</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "expires_in",
            "defaultValue": "86400",
            "description": "<p>Number of seconds left in the lifetime of the access token</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "type",
            "description": "<p>&quot;Bearer&quot;</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "scope",
            "description": "<p>Defines the authorization granted to the client</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"access_token\": \"20b9c0a27315af753c2006dfcf6065ffdcae7fe2\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\",\n    \"scope\": \"advertiser publisher\"\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 400": [
          {
            "group": "Error 400",
            "type": "String",
            "optional": false,
            "field": "error",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 400",
            "type": "String",
            "optional": false,
            "field": "error_description",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": "HTTP/1.1 400 Bad Request\n{\n     \"error\": \"invalid_client\",\n     \"error_description\": \"The client credentials are invalid\"\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Access"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/account/reactivate",
    "title": "Reactivate Account",
    "version": "0.1.0",
    "name": "GetReactivateAccount",
    "group": "Access",
    "permission": [
      {
        "name": "Advertiser Publisher"
      }
    ],
    "description": "<p>Send out email activation for inactive accounts</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "email",
            "description": "<p>URL Encoded account email address. Must match the account email address.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Send Re-activation email",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/account/reactivate?email=email%2Bencoded@provider.com'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\" : true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Email\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/account_interface.php",
    "groupTitle": "Access"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/data_requests/submit",
    "title": "Submit CCPA Data Request",
    "version": "0.1.0",
    "name": "PostSubmitCCPARequest",
    "group": "CCPA",
    "description": "<p>Submit CCPA request on behalf of user using client side request. The request should include credentials https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/x-www-form-urlencoded&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Cookie",
            "description": "<p>Cookies set by the domain &quot;.revcontent.com&quot; will automatically be picked as long as the request credentials are set to &quot;include&quot; when the request is made on client side</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "domain",
            "description": "<p>Domain on which widget exists</p>"
          },
          {
            "group": "Parameter",
            "type": "Integer",
            "optional": false,
            "field": "pub_id",
            "description": "<p>Publisher Revcontent User Id</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "request_id",
            "description": "<p>Request ID</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "email",
            "description": "<p>Email</p>"
          },
          {
            "group": "Parameter",
            "type": "Integer",
            "optional": false,
            "field": "delete_data",
            "description": "<p>Should Users Data be deleted? 1 for yes. Otherwise 0</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Submit CCPA Data Request",
        "content": "curl --location --request POST 'https://www.revcontent.com/stats/api/v1.0/data_requests/submit' \\\n     --header 'Content-Type: application/x-www-form-urlencoded' \\\n     --header 'Cookie: __ID=identifier_cookie_value' \\\n     --data-urlencode 'domain=https://domain.com' \\\n     --data-urlencode 'pub_id=1000' \\\n     --data-urlencode 'request_id=abc123' \\\n     --data-urlencode 'email=abc1234@gmail.com' \\\n     --data-urlencode 'delete_data=1'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Bool",
            "optional": false,
            "field": "success",
            "description": "<p>Requests successfully processed true/false</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": true,
            "field": "message",
            "description": "<p>Message</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n\"success\": true,\n\"message\": 'Request registered'\n}",
          "type": "json"
        },
        {
          "title": "Success-Response",
          "content": "{\n\"success\": false,\n\"message\": 'Failed'\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/data_requests_interface.php",
    "groupTitle": "CCPA"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/data_requests/data",
    "title": "CCPA Data Request",
    "version": "0.1.0",
    "name": "PostUserData",
    "group": "CCPA",
    "description": "<p>Get user's data on behalf of user for submitted ccpa data requests. If request_id is wrong or already resolved success=false will be returned.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "request_id",
            "description": "<p>Request ID</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Request Data",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/x-www-form-urlencoded\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"request_id\": \"XXXXXXXX\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/data_requests/data'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Bool",
            "optional": false,
            "field": "success",
            "description": "<p>Requests successfully processed true/false</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": true,
            "field": "status",
            "description": "<p>Pending/Ready</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": true,
            "field": "csv",
            "description": "<p>List of data csv's</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": true,
            "field": "message",
            "description": "<p>Message</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"status\": 'ready',\n    \"csv\": [\n        \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/impressions/de2fdd6f-e95f-40db-8464-ee4c7bcd745a.csv\",\n        \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/views/f20760d7-dbb2-48de-b4e8-bbd3f61d02ea.csv\",\n        \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/clicks/447b3a56-5a7e-43a0-85b8-32431b9d7238.csv\"\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"status\": 'pending'\n}",
          "type": "json"
        },
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": false,\n    \"message\": 'No request with request_id: XXXXXXXX'\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/data_requests_interface.php",
    "groupTitle": "CCPA"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/data_requests/multiple_data",
    "title": "CCPA Multiple Data Request",
    "version": "0.1.0",
    "name": "PostUsersData",
    "group": "CCPA",
    "description": "<p>Get multiple user's data on behalf of users for submitted ccpa data requests. Requests object in response will have request_id and their respective data. If request_id missing in requests key then consider it failed either because request not registered or already resolved.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "request_ids",
            "description": "<p>Request ID's (separated by comma)</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Multiple Requests Data",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/x-www-form-urlencoded\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"request_ids\": \"XXXXXXXX,YYYYYYYY\"}' \\\n     'https://www.revcontent.com/stats/api/v1.0/data_requests/multiple_data'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Bool",
            "optional": false,
            "field": "success",
            "description": "<p>Requests successfully processed true/false</p>"
          },
          {
            "group": "Success 200",
            "type": "Object",
            "optional": true,
            "field": "requests",
            "description": "<p>Request Objects</p>"
          },
          {
            "group": "Success 200",
            "type": "Object",
            "optional": true,
            "field": "requests.request_id",
            "description": "<p>Request Objects for request with id <code>request_id</code></p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "requests.request_id.csv",
            "description": "<p>Request's List of data csv's</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "requests.request_id.status",
            "description": "<p>Request's status</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": true,
            "field": "message",
            "description": "<p>Message</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"requests\": {\n        \"XXXXXXXX\": {\n            \"status\": \"ready\",\n            \"csv\": [\n                \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/impressions/de2fdd6f-e95f-40db-8464-ee4c7bcd745a.csv\",\n                \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/views/f20760d7-dbb2-48de-b4e8-bbd3f61d02ea.csv\",\n                \"https://revcontent-s1.s3.amazonaws.com/data_privacy_requests/42fd1956-664f-43a7-a13d-eaede8d4050d/clicks/447b3a56-5a7e-43a0-85b8-32431b9d7238.csv\"\n            ]\n        },\n        \"YYYYYYYY\": {\n            \"status\": \"pending\"\n        }\n    }\n}",
          "type": "json"
        },
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": false,\n    \"message\": \"Empty request_ids\"\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/data_requests_interface.php",
    "groupTitle": "CCPA"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts",
    "title": "Get All Campaigns",
    "version": "0.1.0",
    "name": "GetAllBoosts",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of Campaigns</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "boost_id",
            "description": "<p>Campaign ID</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "status",
            "description": "<p>System status of the campaign. Values: &quot;active&quot;, &quot;balance_issue&quot;, &quot;budget_exhausted&quot;, &quot;inactive&quot;, &quot;disabled&quot;, &quot;archived&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "description": "<p>User status of the campaign. Values: &quot;active&quot;, &quot;inactive&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "first of the month",
            "description": "<p>Start date for the statistics in Y-m-d format. Defaults to first of the current month.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format. Defaults to today.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "aggregate",
            "defaultValue": "no",
            "description": "<p>If 'yes', statistics aggregated by date are retrieved.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "created_at",
            "defaultValue": "null",
            "description": "<p>If set, will bring back campaigns created on or after specified date.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "updated_at",
            "defaultValue": "null",
            "description": "<p>If set, will bring back campaigns updated on or after specified date.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Campaigns",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts'",
        "type": "json"
      },
      {
        "title": "Get Campaigns (Aggregate)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts?date_from=2016-11-06&date_to=2016-11-07&aggregate=yes'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of campaigns and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Campaign id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Campaign name</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.start_date",
            "description": "<p>Campaign Start date (YY-mm-dd HH:mm:ss)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.end_date",
            "description": "<p>Campaign End date (YY-mm-dd HH:mm:ss)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.enabled",
            "description": "<p>Campaign enabled or disabled ('active', 'inactive')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.status",
            "description": "<p>Campaign status ('active','balance_issue','budget_exhausted','inactive','disabled','archived', 'non_archived')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.bid_type",
            "description": "<p>Campaign Bid Type</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.default_bid",
            "description": "<p>Default bid for the campaign.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.min_bid",
            "description": "<p>Campaign Minimum CPC Bid</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.max_bid",
            "description": "<p>Campaign Maximum CPC Bid</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.budget",
            "description": "<p>Campaign Budget amount</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pacing",
            "description": "<p>Campaign Pacing is available for all campaigns with a limited budget. Enabling pacing forces your budget to spend evenly throughout the day rather than spending as quickly as possible. If budget is set to 'unlimited', pacing will default to 'off'. Otherwise, default is 'on'.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.schedule",
            "description": "<p>Campaign Scheduling. Allows for setting hours where campaign is on. All other hours campaign is off. Ex. schedule: [15,16,17] Campaign will be on for 3pm - 5pm in your audiences time zone. Note: NULL value implies no schedule is set.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of Impression for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of Viewable Impressions for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.vctr",
            "description": "<p>vCTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.utm_codes",
            "description": "<p>Campaign UTM codes</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pixel_url",
            "description": "<p>Pixel URL</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.optimize",
            "description": "<p>Optimize for strategy ('cpc' or 'cpa')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.created_at",
            "description": "<p>When the campaign was created at.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.updated_at",
            "description": "<p>When the campaign was last updated.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.country_codes",
            "description": "<p>List of ISO country abbreviations. Ex.  country_codes&quot;: [&quot;US&quot;]</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.device_targeting",
            "description": "<p>List of device targeting for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Devices for values.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.os_targeting",
            "description": "<p>List of operating systems for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Operating Systems for values. IDs must match device_targeting.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.region_codes",
            "description": "<p>List of regions codes Ex.  region_codes&quot;: [&quot;FL&quot;,&quot;CA&quot;]</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.region_targeting",
            "description": "<p>Targeting type</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.language_targeting",
            "description": "<p>List of languages targeting for the campaign. Ex. language_targeting: [&quot;1&quot;,&quot;2&quot;]  See section Helpers :: Get Languages for values.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.browser_targeting",
            "description": "<p>List of browser targeting for the campaign. Only available when targeting Desktop device. Ex. browser_targeting: [&quot;1&quot;,&quot;2&quot;]  See section Helpers :: Get Browsers for values.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.dma_targeting",
            "description": "<p>DMA Targeting. Values: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.dma_codes",
            "description": "<p>List of DMA codes for the campaign. See section Helpers :: Get DMA Codes</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.zipcode_targeting",
            "description": "<p>Zipcode Targeting. Values: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.zipcode_codes",
            "description": "<p>List of valid US zip codes for the campaign. Ex: [&quot;11220&quot;, &quot;34243&quot;, &quot;48212&quot;]</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data.pixels",
            "description": "<p>Conversion pixels information. Only included when conversion(s) exist.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pixels.id",
            "description": "<p>Conversion pixel id.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pixels.name",
            "description": "<p>Conversion pixel name.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pixels.amount",
            "description": "<p>Conversion pixel amount.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pixels.pixel",
            "description": "<p>Conversion pixel code.</p>"
          }
        ],
        "Aggregate": [
          {
            "group": "Aggregate",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Aggregate",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of aggregated campaigns and their statistics</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.date",
            "description": "<p>Stats date (YY-mm-dd)</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of Impression for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of Viewable Impressions for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.vctr",
            "description": "<p>vCTR for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected date</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected date</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\" : true,\n    \"data\": [\n               {\n                    \"id\": \"218\",\n                    \"name\": \"Test Campaign 1\",\n                    \"start_date\": \"2013-11-05 00:00:00\",\n                    \"end_date\": \"2015-11-18 00:00:00\",\n                    \"enabled\": \"active\",\n                    \"status\": \"disabled\",\n                    \"bid_type\": \"cpc\",\n                    \"default_bid\": \"0.33\",\n                    \"min_bid\": \"0.16\",\n                    \"max_bid\": \"0.16\",\n                    \"budget\": \"295.00\",\n                    \"pacing\": \"on\",\n                    \"schedule\": null,\n                    \"impressions\": \"185766183\",\n                    \"viewable_impressions\": \"45665587\",\n                    \"clicks\": \"519170\",\n                    \"conversions\": \"0\",\n                    \"ctr\": \"0.2795\",\n                    \"vctr\": \"1.6795\",\n                    \"average_cpc\": \"0.06643828\",\n                    \"cost\": \"34492.7600\",\n                    \"return\": \"0.0000\",\n                    \"profit\": \"-34492.7600\"\n                    \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n                    \"pixel_url\": \"\",\n                    \"country_codes\": [\"US\"]\n                    \"country_targeting\": \"include\",\n                    \"region_codes\": [\"FL\"]\n                    \"region_targeting\": \"include\",\n                    \"optimize\": \"cpc\",\n                    \"device_targeting\": [\"1\",\"2\"],\n                    \"os_targeting\": [\"1\",\"2\"],\n                    \"language_targeting\": [\"1\",\"2\"],\n                    \"browser_targeting\": [\"1\",\"2\"],\n                    \"dma_targeting\": [\"include\"],\n                    \"dma_codes\": [\"501\"],\n                    \"zipcode_targeting\": [\"include\"],\n                    \"zipcode_codes\": [\"48212\"],\n                    \"created_at\": \"2013-11-01 00:00:00\",\n                    \"updated_at\": null,\n                     \"pixels\": [\n                       {\n                           \"id\": \"73\",\n                           \"name\": \"My conversion\",\n                           \"amount\": \"1.55\",\n                           \"pixel\": \"<img src=\\\"http://revcontent.com/foo?z=IWIOOAua\\\" />\"\n                       }\n                     ]\n                },\n                {\n                    \"id\": \"510\",\n                    \"name\": \"Test Campaign 2\",\n                    \"start_date\": \"2013-11-05 00:00:00\",\n                    \"end_date\": \"2015-11-18 00:00:00\",\n                    \"enabled\": \"active\",\n                    \"status\": \"disabled\",\n                    \"bid_type\": \"cpc\",\n                    \"default_bid\": \"0.33\",\n                    \"min_bid\": \"0.16\",\n                    \"max_bid\": \"0.16\",\n                    \"budget\": \"295.00\",\n                    \"pacing\": \"on\",\n                    \"schedule\": null,\n                    \"impressions\": \"185766183\",\n                    \"viewable_impressions\": \"45665587\",\n                    \"clicks\": \"519170\",\n                    \"conversions\": \"0\",\n                    \"ctr\": \"0.2795\",\n                    \"vctr\": \"1.6795\",\n                    \"average_cpc\": \"0.06643828\",\n                    \"cost\": \"34492.7600\",\n                    \"return\": \"0.0000\",\n                    \"profit\": \"-34492.7600\"\n                    \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n                    \"pixel_url\": \"\",\n                    \"country_codes\": [\"US\"]\n                    \"country_targeting\": \"include\",\n                    \"region_codes\": [\"FL\"]\n                    \"region_targeting\": \"include\",\n                    \"optimize\": \"cpc\",\n                    \"device_targeting\": [\"1\",\"2\"],\n                    \"os_targeting\": [\"1\",\"2\"],\n                    \"language_targeting\": [\"1\",\"2\"],\n                    \"browser_targeting\": [\"1\",\"2\"],\n                    \"dma_targeting\": [\"include\"],\n                    \"dma_codes\": [\"501\"],\n                    \"zipcode_targeting\": [\"include\"],\n                    \"zipcode_codes\": [\"48212\"],\n                    \"created_at\": \"2013-11-01 00:00:00\",\n                    \"updated_at\": null,\n                     \"pixels\": [\n                       {\n                           \"id\": \"3\",\n                           \"name\": \"My conversion\",\n                           \"amount\": \"1.55\",\n                           \"pixel\": \"<img src=\\\"http://revcontent.com/foo?z=IWIOOAua\\\" />\"\n                       }\n                     ]\n                }\n           ]\n       }",
          "type": "json"
        },
        {
          "title": "Success-Response Aggregate",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-11-07\",\n            \"impressions\": \"185766183\",\n            \"viewable_impressions\": \"45665587\",\n            \"clicks\": \"519170\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2795\",\n            \"vctr\": \"1.6795\",\n            \"average_cpc\": \"0.06643828\",\n            \"cost\": \"34492.7600\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-34492.7600\"\n        },\n        {\n            \"date\": \"2016-11-06\",\n            \"impressions\": \"212554031\",\n            \"viewable_impressions\": \"0\",\n            \"clicks\": \"690782\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3250\",\n            \"vctr\": \"1.6795\",\n            \"vtr\": \"0.000\",\n            \"average_cpc\": \"0.05746427\",\n            \"cost\": \"39695.2800\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-39695.2800\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/performance",
    "title": "Get Campaign Performance",
    "version": "0.1.0",
    "name": "GetBoostPerformance",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get Performance Statistics for All Campaigns / Specific Campaign</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "boost_id",
            "description": "<p>Campaign ID (If empty, all campaigns aggregated statistics are retrieved).</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "first of the month",
            "description": "<p>Start date for the statistics in Y-m-d format. Defaults to first of the current month.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format. Defaults to today.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "all_boosts",
            "defaultValue": "no",
            "description": "<p>If 'yes', and boost_id is not provided, statistics aggregated by Id are retrieved.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "created_at",
            "defaultValue": "null",
            "description": "<p>If set, will bring back campaigns created on or after specified date.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "updated_at",
            "defaultValue": "null",
            "description": "<p>If set, will bring back campaigns updated on or after specified date.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Performance (default values)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/performance'",
        "type": "json"
      },
      {
        "title": "Get Performance (with filters)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/performance?boost_id=100&date_from=2016-03-01&date_to=2016-03-07'",
        "type": "json"
      },
      {
        "title": "Get Performance (with filters no boost_id)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/performance?date_from=2016-03-01&date_to=2016-03-07'",
        "type": "json"
      },
      {
        "title": "Get Performance (aggregated by boost_id)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/performance?date_from=2016-05-27&date_to=2016-05-28&all_boosts=yes'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of campaigns and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": true,
            "field": "data.id",
            "description": "<p>Campaign id. Only when filter all_boost=yes</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.date",
            "description": "<p>Stats date (YY-mm-dd)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of Impression for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of Viewable Impressions for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.vctr",
            "description": "<p>Viewable CTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost per conversion for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.created_at",
            "description": "<p>When the campaign was created at.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.updated_at",
            "description": "<p>When the campaign was last updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response (default values, today=2016-03-07)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-03-01\",\n            \"impressions\": \"146299926\",\n            \"viewable_impressions\": \"4856645\",\n            \"clicks\": \"558695\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3819\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04110327\",\n            \"cost\": \"22964.1900\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-22964.1900\"\n        },\n        {\n            \"date\": \"2016-03-02\",\n            \"impressions\": \"141200030\",\n            \"viewable_impressions\": \"456687998\",\n            \"clicks\": \"492804\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3490\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.03913846\",\n            \"cost\": \"19287.5900\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-19287.5900\"\n        },\n        {\n            \"date\": \"2016-03-03\",\n            \"impressions\": \"116063762\",\n            \"viewable_impressions\": \"456878855\",\n            \"clicks\": \"373168\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3215\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.03963073\",\n            \"cost\": \"14788.9200\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-14788.9200\"\n        },\n        {\n            \"date\": \"2016-03-04\",\n            \"impressions\": \"101758856\",\n            \"viewable_impressions\": \"788954666\",\n            \"clicks\": \"321858\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3163\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04228427\",\n            \"cost\": \"13609.5300\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-13609.5300\"\n        },\n        {\n            \"date\": \"2016-03-05\",\n            \"impressions\": \"129758130\",\n            \"viewable_impressions\": \"15566488\",\n            \"clicks\": \"400733\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3088\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04149481\",\n            \"cost\": \"16628.3400\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-16628.3400\"\n        },\n        {\n            \"date\": \"2016-03-06\",\n            \"impressions\": \"152533186\",\n            \"viewable_impressions\": \"63254125\",\n            \"clicks\": \"411781\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2700\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04136820\",\n            \"cost\": \"17034.6400\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-17034.6400\"\n        },\n        {\n            \"date\": \"2016-03-07\",\n            \"impressions\": \"124309196\",\n            \"viewable_impressions\": \"744788946\",\n            \"clicks\": \"350109\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2816\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04531540\",\n            \"cost\": \"15865.3300\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-15865.3300\"\n        }\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response (with filters - boost_id = 100)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-03-01\",\n            \"impressions\": \"2615\",\n            \"clicks\": \"6\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2294\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"0.1200\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.1200\"\n        },\n        {\n            \"date\": \"2016-03-02\",\n            \"impressions\": \"5031\",\n            \"clicks\": \"36\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.7156\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"0.7200\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.7200\"\n        },\n        {\n            \"date\": \"2016-03-03\",\n            \"impressions\": \"620\",\n            \"clicks\": \"1\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.1613\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"0.0200\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.0200\"\n        },\n        {\n            \"date\": \"2016-03-04\",\n            \"impressions\": \"13821\",\n            \"clicks\": \"30\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2171\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"0.6000\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.6000\"\n        },\n        {\n            \"date\": \"2016-03-05\",\n            \"impressions\": \"11407\",\n            \"clicks\": \"22\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.1929\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"0.4400\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.4400\"\n        },\n        {\n            \"date\": \"2016-03-06\",\n            \"impressions\": \"60316\",\n            \"clicks\": \"98\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.1625\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"1.9600\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-1.9600\"\n        },\n        {\n            \"date\": \"2016-03-07\",\n            \"impressions\": \"5940\",\n            \"clicks\": \"75\",\n            \"conversions\": \"0\",\n            \"ctr\": \"1.2626\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.02000000\",\n            \"cost\": \"1.5000\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-1.5000\"\n        }\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response (with filters not boost_id)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-03-01\",\n            \"impressions\": \"146299926\",\n            \"clicks\": \"558695\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3819\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04110327\",\n            \"cost\": \"22964.1900\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-22964.1900\"\n        },\n        {\n            \"date\": \"2016-03-02\",\n            \"impressions\": \"141200030\",\n            \"clicks\": \"492804\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3490\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.03913846\",\n            \"cost\": \"19287.5900\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-19287.5900\"\n        },\n        {\n            \"date\": \"2016-03-03\",\n            \"impressions\": \"116063762\",\n            \"clicks\": \"373168\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3215\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.03963073\",\n            \"cost\": \"14788.9200\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-14788.9200\"\n        },\n        {\n            \"date\": \"2016-03-04\",\n            \"impressions\": \"101758856\",\n            \"clicks\": \"321858\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3163\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04228427\",\n            \"cost\": \"13609.5300\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-13609.5300\"\n        },\n        {\n            \"date\": \"2016-03-05\",\n            \"impressions\": \"129758130\",\n            \"clicks\": \"400733\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.3088\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04149481\",\n            \"cost\": \"16628.3400\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-16628.3400\"\n        },\n        {\n            \"date\": \"2016-03-06\",\n            \"impressions\": \"152533186\",\n            \"clicks\": \"411781\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2700\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04136820\",\n            \"cost\": \"17034.6400\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-17034.6400\"\n        },\n        {\n            \"date\": \"2016-03-07\",\n            \"impressions\": \"124309196\",\n            \"clicks\": \"350109\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.2816\",\n            \"vctr\": \"1.3819\",\n            \"avg_cpc\": \"0.04531540\",\n            \"cost\": \"15865.3300\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-15865.3300\"\n        }\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response (aggregated by boost_id)",
          "content": "\n{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"48735\",\n            \"date\": \"2016-05-27\",\n            \"impressions\": \"0\",\n            \"viewable_impressions\": \"0\",\n            \"clicks\": \"7\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.00\",\n            \"vctr\": \"0.00\",\n            \"avg_cpc\": \"0.15142857\",\n            \"avg_vcpm\": \"0.000\",\n            \"cost\": \"1.0600\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-1.0600\",\n            \"created_at\": \"2013-11-01 00:00:00\",\n            \"updated_at\": null,\n        },\n        {\n            \"id\": \"48737\",\n            \"date\": \"2016-05-27\",\n            \"impressions\": \"0\",\n            \"viewable_impressions\": \"0\",\n            \"clicks\": \"1\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.00\",\n            \"vctr\": \"0.00\",\n            \"avg_cpc\": \"0.13000000\",\n            \"avg_vcpm\": \"0.000\",\n            \"cost\": \"0.1300\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-0.1300\",\n            \"created_at\": \"2013-11-01 00:00:00\",\n            \"updated_at\": null,\n        },\n        {\n            \"id\": \"90345\",\n            \"date\": \"2016-05-27\",\n            \"impressions\": \"6148890\",\n            \"viewable_impressions\": \"0\",\n            \"clicks\": \"9786\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.1592\",\n            \"vctr\": \"0.00\",\n            \"avg_cpc\": \"0.13264664\",\n            \"avg_vcpm\": \"0.000\",\n            \"cost\": \"1298.0800\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-1298.0800\",\n            \"created_at\": \"2013-11-01 00:00:00\",\n            \"updated_at\": null,\n        },\n        {\n            \"id\": \"90345\",\n            \"bid_type\": \"cpc\",\n            \"date\": \"2016-05-28\",\n            \"impressions\": \"9055901\",\n            \"viewable_impressions\": \"0\",\n            \"clicks\": \"17411\",\n            \"conversions\": \"0\",\n            \"ctr\": \"0.1923\",\n            \"vctr\": \"0.00\",\n            \"avg_cpc\": \"0.13615530\",\n            \"avg_vcpm\": \"0.000\",\n            \"cost\": \"2370.6000\",\n            \"cost_per_conv\": \"0.000\",\n            \"return\": \"0.0000\",\n            \"profit\": \"-2370.6000\",\n            \"created_at\": \"2013-11-01 00:00:00\",\n            \"updated_at\": null,\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/:boost_id/widgets/stats",
    "title": "Get Widget Stats",
    "version": "0.1.0",
    "name": "GetWidgetStats",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of widget stats</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;'</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "widget_id",
            "description": "<p>Widget ID to look for.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "domain",
            "description": "<p>Domain to look for.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "min_spend",
            "description": "<p>Min. spend to look for.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "first of the month",
            "description": "<p>Start date for the statistics in Y-m-d format. Defaults to first of the current month.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format. Defaults to today. Limit 60 days after &quot;date_from&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Widget Stats",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\"\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     \"https://api.revcontent.io/stats/api/v1.0/boosts/42304/widgets/stats?date_from=2016-02-01&date_to=2016-02-29&limit=2&offset=0\"",
        "type": "json"
      },
      {
        "title": "Get Widget Stats (widget_id = 143)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\"\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     \"https://api.revcontent.io/stats/api/v1.0/boosts/42304/widgets/stats?date_from=2016-02-01&date_to=2016-02-29&widget_id=143\"",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widgets and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Widget ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.domain",
            "description": "<p>Widget Domain</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.placement_type",
            "description": "<p>Placement type label as shown in the interface (e.g. &quot;Below Article&quot;, &quot;Right Rail / Sidebar&quot;, &quot;Email&quot;, &quot;Apple News&quot;). &quot;No Placement Type&quot; when no placement is set; null if the placement is hidden/unknown.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of viewable impressions for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.vctr",
            "description": "<p>Viewable CTR for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_vcpm",
            "description": "<p>Average VCPM for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.spend",
            "description": "<p>Spend for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversion",
            "description": "<p>Total number of conversions for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost per conversion</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for widget</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\":true,\n    \"data\": [\n                 {\n                    \"id\": \"143\",\n                    \"domain\": \"revcontent.com\",\n                    \"placement_type\": \"Below Article\",\n                    \"impressions\": \"64\",\n                    \"viewable_impressions\": \"4045\",\n                    \"clicks\": \"1\",\n                    \"ctr\": \"1.5625\",\n                    \"avg_cpc\": \"0.02000000\",\n                    \"avg_vcpm\": \"0.00\",\n                    \"spend\": \"0.0200\",\n                    \"conversions\": \"0\",\n                    \"cost_per_conv\": \"0.0000\",\n                    \"profit\": \"-0.0200\"\n                 },\n                 {\n                    \"id\": \"151\",\n                    \"domain\": \"revcontent.com\",\n                    \"impressions\": \"1\",\n                    \"viewable_impressions\": \"109\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"avg_cpc\": \"0.00000000\",\n                    \"avg_vcpm\": \"0.00\",\n                    \"spend\": \"0.0000\",\n                    \"conversions\": \"0\",\n                    \"cost_per_conv\": \"0.0000\",\n                    \"profit\": \"0.0000\"\n                 },\n        ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response (widget_id = 143)",
          "content": "{\n    \"success\":true,\n    \"data\": [\n                 {\n                    \"id\": \"143\",\n                    \"domain\": \"revcontent.com\",\n                    \"placement_type\": \"Below Article\",\n                    \"impressions\": \"64\",\n                    \"viewable_impressions\": \"0\",\n                    \"clicks\": \"1\",\n                    \"ctr\": \"1.5625\",\n                    \"vctr\": \"0\",\n                    \"avg_cpc\": \"0.02000000\",\n                    \"avg_vcpm\": \"0.00\",\n                    \"spend\": \"0.0200\",\n                    \"conversions\": \"0\",\n                    \"cost_per_conv\": \"0.0000\",\n                    \"profit\": \"-0.0200\"\n                 }\n        ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/add",
    "title": "Add Campaign",
    "version": "0.1.0",
    "name": "PostBoostAdd",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Add a campaign</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>Campaign name.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "bid_type",
            "defaultValue": "cpc",
            "description": "<p>Bid type CPC/VCPM</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "bid_amount",
            "defaultValue": "0.50",
            "description": "<p>Bid amount. This is a deprecated parameter for backward compatibility, use 'default_bids' section instead</p>"
          },
          {
            "group": "Body",
            "type": "Mixed",
            "optional": true,
            "field": "budget",
            "defaultValue": "unlimited",
            "description": "<p>Budget type for the campaign. Supports: 'unlimited' or an amount (0.00). CSR accounts can not have unlimited budgets.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "pacing",
            "description": "<p>Pacing is available for all campaigns with a limited budget. Enabling pacing forces your budget to spend evenly throughout the day rather than spending as quickly as possible. If budget is set to 'unlimited', pacing will default to 'off'. Otherwise, default is 'on'.</p>"
          },
          {
            "group": "Body",
            "type": "Int[]",
            "optional": true,
            "field": "schedule",
            "description": "<p>Campaign Scheduling. Allows for setting hours where campaign is on. All other hours campaign is off. Ex. schedule: [15,16,17] Campaign will be on for 3pm - 5pm in your audiences time zone. Note: Only available for campaigns with unlimited budgets.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "optimize",
            "defaultValue": "cpc",
            "description": "<p>Optimize for strategy: Supports 'cpc' or 'cpa'.</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": true,
            "field": "conversion",
            "description": "<p>Conversion pixels information. Only mandatory when optimize is 'cpa'</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": true,
            "field": "conversion.id",
            "description": "<p>Conversion id</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "start_date",
            "defaultValue": "immediately",
            "description": "<p>Start date and time for the campaign. Supports: 'immediately' (now) or datetime in in y-m-d h:m:s format.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "end_date",
            "defaultValue": "never",
            "description": "<p>End date and time for the campaign. Supports: 'never' (never ends) or datetime in in y-m-d h:m:s format.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "country_targeting",
            "defaultValue": "all",
            "description": "<p>The type of geographic targeting set for the campaign. Supports: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "country_codes",
            "description": "<p>List of ISO country abbreviations. Ex.  country_codes&quot;: [&quot;PE&quot;] . See section Helpers :: Get Countries. Is mandatory if country_targeting is not 'all'.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "region_targeting",
            "defaultValue": "all",
            "description": "<p>The type of region geographic targeting set for the campaign. Supports: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "region_codes",
            "description": "<p>List of ISO country region abbreviations. Ex. region_codes&quot;: [&quot;FL&quot;] . See section Helpers :: Get Regions. Is mandatory if region_targeting is not 'all'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "device_targeting",
            "defaultValue": "all",
            "description": "<p>List of device targeting for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Devices for values.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "os_targeting",
            "defaultValue": "all",
            "description": "<p>List of operating systems for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Operating Systems for values. IDs must match device_targeting.  Note: When targeting OS IDs 4/5, or IDs 6/7/8 it will reset to targeting All.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "language_targeting",
            "defaultValue": "all",
            "description": "<p>List of languages targeting for the campaign. Ex. language_targeting: [&quot;1&quot;,&quot;2&quot;]  See section Helpers :: Get Languages for values.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "browser_targeting",
            "defaultValue": "all",
            "description": "<p>List of browser targeting for the campaign. Only available when targeting Desktop device. Ex. browser_targeting: [&quot;1&quot;,&quot;2&quot;]  See section Helpers :: Get Browsers for values.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "dma_targeting",
            "defaultValue": "all",
            "description": "<p>DMA Targeting. Supports: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "dma_codes",
            "description": "<p>List of DMA codes for the campaign. See section Helpers :: Get DMA Codes</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "zipcode_targeting",
            "defaultValue": "all",
            "description": "<p>Zipcode Targeting. Supports: 'all', 'include', 'exclude'. If set to 'include', country_codes must contain US in the list.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "zipcode_codes",
            "description": "<p>List of valid US zip codes for the campaign. Ex: [&quot;11220&quot;, &quot;34243&quot;, &quot;48212&quot;]</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "tracking_code",
            "description": "<p>UTM code string (Max: 255 characters). Ex. utm_source=revcontent</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "pixel_url",
            "description": "<p>Campaign Pixel Tracking URL (only open to select users).</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": true,
            "field": "default_bids",
            "description": "<p>Default bid amounts for different traffic types</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.email",
            "description": "<p>Default bid for email widgets</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.apple_news",
            "description": "<p>Default bid for Apple News widgets</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.web",
            "description": "<p>Default bid for all non-email, non-Apple News widgets</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Add CPC Campaign",
        "content": "\ncurl -X POST \\\n     -H \"Authorization: Bearer 633066d5c604cdb3b311d8a9b821f76c9a961c65\" \\\n     -H \"Content-Type: application/json\"\n     -H \"Cache-Control: no-cache\"\n     -d '{\"name\":\"cpa campaign\",\"bid_amount\":\"0.35\",\"budget\":\"unlimited\",\"optimize\":\"cpc\", \\\n         \"start_date\":\"immediately\",\"end_date\":\"never\", \\\n         \"target_codes\":\"\", \"country_targeting\" : \"all\", \\\n         \"device_targeting\":\"all\",\"tracking_code\":\"utm_source=revcontent\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/add'",
        "type": "json"
      },
      {
        "title": "Add CPA Campaign",
        "content": "curl -X POST -H \"Authorization: Bearer a0a234a0c3cccccb32e12acc450eab519787f9be\" \\\n-H \"Content-Type: application/json\" \\\n-H \"Cache-Control: no-cache\" \\\n-d '{\"name\":\"cpa campaign\",\"bid_amount\":\"0.35\",\"budget\":\"unlimited\",\"optimize\":\"cpa\", \\\n     \"conversion\":[{\"id\": 308},{\"id\": 309}], \\\n     \"start_date\" : \"immediately\",\"end_date\" : \"never\", \\\n     \"target_codes\" : \"\",\"country_targeting\" : \"exclude\",\"country_codes\": [\"US\", \"PE\"], \\\n     \"device_targeting\":[\"3\",\"4\"], \"dma_targeting\": [\"501\", \"803\"], \"zipcode_targeting\": [\"34243\"], \\\n     \"language_targeting\":[\"1\",\"2\",\"3\"], \"tracking_code\":\"utm_source=revcontent\"}' \\\n'https://api.revcontent.io/stats/api/v1.0/boosts/add'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of added campaigns</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Campaign id</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success CPC Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"313\"\n        }\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success CPA Response",
          "content": "{\n    \"success\": true,\n    \"campaign\": {\n        \"id\": 315,\n        \"pixels\": [\n            {\n                \"id\": 100,\n                \"name\": \"test pixel 1\",\n                \"amount\": \"0.25\",\n                \"pixel\": \"<img src=\\\"http://trends.revcontent.com/conv.php?t=eJwFwQUBwEAMBDBLhZXkXOH9S1gCXPWEb34EqiY8ewcBeirbVPlEjUOrV0RmUz1ajXhM1n9eaBHM\\\" />\"\n            },\n            {\n                \"id\": 101,\n                \"name\": \"test pixel 2\",\n                \"amount\": \"0.35\",\n                \"pixel\": \"<img src=\\\"http://trends.revcontent.com/conv.php?t=eJwFwQkBwDAIA0BL5UkAObQD%2FxJ259j2yVWFxDrFKj2Kd4nniUEtzgcDWK0a5Fypfi%2FzuM0PFpUQjg%3D%3D\\\" />\"\n            }\n        ]\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid dates range. end_date has to be greater than or equal to start_date\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/archive",
    "title": "Archive Campaign",
    "version": "0.1.0",
    "name": "PostBoostArchive",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Archive campaign</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;'</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Archive Boost",
        "content": "curl -X POST \\\n     https://api.revcontent.io/stats/api/v1.0/boosts/:boost_id/archive \\\n     -H 'authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d' \\\n     -H 'cache-control: no-cache' \\\n     -H 'content-type: application/json'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "                         {\n                             \"success\":true,\n                             \"data\": {\n                                 \"id\": \"313939\",\n                                 \"status\": \"archived\"\n}\n                         }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/settings",
    "title": "Update Campaign Settings",
    "version": "0.1.0",
    "name": "PostBoostSettings",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Update Campaign Settings</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "name",
            "description": "<p>Campaign name.</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "default_bid",
            "description": "<p>Default bid amount for the campaign (CPC). This is a deprecated parameter for backward compatibility, use 'default_bids' section instead</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "budget_type",
            "description": "<p>Budget type for the campaign. Values: daily, unlimited. CSR accounts can not have unlimited budgets.</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "budget_amount",
            "description": "<p>Budget for the campaign in USD (applies only if budget_type is set to 'daily'). Min: 50.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "pacing",
            "description": "<p>Pacing enable. Values: on, off (applies only if budget_type is set to 'daily'). Will default to 'on' when budget_type is set to 'daily', or will default to 'off' when 'unlimited'.</p>"
          },
          {
            "group": "Body",
            "type": "Int[]",
            "optional": true,
            "field": "schedule",
            "description": "<p>Campaign Scheduling. Allows for setting hours where campaign is on. All other hours campaign is off. Ex. schedule: [15,16,17] Campaign will be on for 3pm - 5pm in your audiences time zone.  To clear a schedule and serve ads normally, send an empty list: Ex. schedule: []  Note: Only available for campaigns with unlimited budgets.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "optimize",
            "defaultValue": "cpc",
            "description": "<p>Optimize for strategy: Supports 'cpc' or 'cpa'.</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": true,
            "field": "conversion",
            "description": "<p>Conversion pixels information. Only mandatory when optimize is 'cpa'</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": false,
            "field": "conversion.id",
            "description": "<p>Conversion ID to add to campaign (or remove from campaign if delete flag is set).</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": false,
            "field": "conversion.delete",
            "description": "<p>Set to true to remove from conversion from campaign. Optional.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "start_date_time",
            "description": "<p>Start date and time for the campaign in y-m-d h:m:s format.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "has_end_date",
            "description": "<p>Determines whether an end date for the campaign is set. Setting to false means the campaign will run continously. Values: true, false.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "end_date_time",
            "description": "<p>End date and time for the campaign in y-m-d h:m:s format. NOTE: has_end_date must be set to true to use this parameter.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "country_targeting",
            "description": "<p>The type of geographic targeting set for the campaign. Values: &quot;all&quot;, &quot;include&quot;, &quot;exclude&quot;.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "country_codes",
            "description": "<p>List of ISO country abbreviations. Ex.  &quot;country_codes&quot;: [&quot;PE&quot;]. See section Helpers :: Get Countries for values. Is mandatory if country_targeting is not 'all'.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "region_targeting",
            "defaultValue": "all",
            "description": "<p>The type of region geographic targeting set for the campaign. Supports: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "region_codes",
            "description": "<p>List of ISO country region abbreviations. Ex. region_codes&quot;: [&quot;FL&quot;] . See section Helpers :: Get Regions. Is mandatory if region_targeting is not 'all'. * country_codes values is required to update region_codes.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "device_targeting",
            "defaultValue": "all",
            "description": "<p>List of device targeting for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Devices for values.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "os_targeting",
            "defaultValue": "all",
            "description": "<p>List of operating systems for the campaign. Ex. device_targeting: [&quot;1&quot;,&quot;2&quot;] See section Helpers :: Get Operating Systems for values. IDs must match device_targeting. Note: When targeting OS IDs 4/5, or IDs 6/7/8 it will reset to targeting All.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "language_traffic",
            "description": "<p>List of languages targeting for the campaign.  Ex. &quot;language_traffic: [&quot;1&quot;,&quot;2&quot;]&quot; See section Helpers :: Get Languages for values. If you want to target all languages, use 'all'. Ex. language_traffic:&quot;all&quot;.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "browser_targeting",
            "defaultValue": "all",
            "description": "<p>List of browser targeting for the campaign. Only available when targeting Desktop device. Ex. browser_targeting: [&quot;1&quot;,&quot;2&quot;]  See section Helpers :: Get Browsers for values.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "dma_targeting",
            "defaultValue": "all",
            "description": "<p>DMA Targeting. Supports: 'all', 'include', 'exclude'.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "dma_codes",
            "description": "<p>List of DMA codes for the campaign. See section Helpers :: Get DMA Codes</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "zipcode_targeting",
            "defaultValue": "all",
            "description": "<p>Zipcode Targeting. Supports: 'all', 'include', 'exclude'. If set to 'include', country_codes must contain US in the list.</p>"
          },
          {
            "group": "Body",
            "type": "String[]",
            "optional": true,
            "field": "zipcode_codes",
            "description": "<p>List of valid US zip codes for the campaign. Ex: [&quot;11220&quot;, &quot;34243&quot;, &quot;48212&quot;]</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "utm_codes",
            "description": "<p>UTM code string (Max: 2048 characters).</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "pixel_url",
            "description": "<p>Campaign Pixel Tracking URL (only open to select users).</p>"
          },
          {
            "group": "Body",
            "type": "Object",
            "optional": true,
            "field": "default_bids",
            "description": "<p>Default bid amounts for different traffic types</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.email",
            "description": "<p>Default bid for email widgets</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.apple_news",
            "description": "<p>Default bid for Apple News widgets</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "default_bids.web",
            "description": "<p>Default bid for all non-email, non-Apple News widgets</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update Single Campaign Attribute",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"name\": \"My Renamed Campaign\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/settings'",
        "type": "json"
      },
      {
        "title": "Update Multiple Campaign Attributes",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{ \"name\":\"My Renamed Campaign\",\"default_bid\":\"0.05\",\"budget_type\":\"daily\",\"budget_amount\":\"1000\", \\\n          \"start_date_time\":\"2016-11-30 00:00:00\",\"has_end_date\":\"true\",\"end_date_time\":\"2016-11-30 23:59:59\", \\\n          \"country_targeting\":\"include\",\"country_codes\":[\"PE\",\"US\", \"GB\"],\n          \"device_targeting\":[\"1\",\"3\"],\"language_traffic\":[\"1\",\"2\"]} \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/settings'",
        "type": "json"
      },
      {
        "title": "Update Multiple Campaign Targeting Attributes (using 'all')",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"country_targeting\":\"all\", \"device_targeting\":\"all\", \"language_traffic\":\"all\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/settings'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if the campaign was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "\n{\n   \"id\": \"17\",\n   \"name\": \"Fun Test\",\n   \"start_date\": \"2016-10-20 00:00:00\",\n   \"end_date\": null,\n   \"enabled\": \"active\",\n   \"status\": \"active\",\n   \"bid_type\": \"cpc\",\n   \"default_bid\": \"0.24\",\n   \"min_bid\": \"0.18\",\n   \"max_bid\": \"0.32\",\n   \"budget\": \"unlimited\",\n   \"pacing\": \"off\",\n   \"schedule\": \"15,16,17,18,19,20\",\n   \"cost\": \"0.00\",\n   \"ctr\": \"0.00\",\n   \"utm_codes\": null,\n   \"country_codes\": [],\n   \"country_targeting\": \"all\",\n   \"optimize\": \"cpc\",\n   \"language_targeting\": [],\n   \"device_targeting\": [],\n   \"os_targeting\": [],\n    \"pixels\": [\n      {\n          \"id\": \"3\",\n          \"name\": \"My conversion\",\n          \"amount\": \"1.55\",\n          \"pixel\": \"<img src=\\\"http://revcontent.com/foo?z=IWIOOAua\\\" />\"\n      }\n   ],\n   \"success\": true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts",
    "title": "Update Campaign Status",
    "version": "0.1.0",
    "name": "PostBoostsStatus",
    "group": "Campaigns",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Update Campaign Status.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified. Apply changes to a specific campaign id.</p>"
          },
          {
            "group": "Body",
            "type": "boolean",
            "optional": true,
            "field": "do_all",
            "defaultValue": "false",
            "description": "<p>Apply status update to all campaigns. This parameter is set to false when boost_id is included.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "defaultValue": "on",
            "description": "<p>Content status. Values: &quot;on&quot;, &quot;off&quot;.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update boost",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": 217, \"enabled\" : \"on\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts'",
        "type": "json"
      },
      {
        "title": "Update multiple boosts",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '[{\"id\": 217, \"enabled\" : \"on\"},{\"id\": 218, \"enabled\" : \"off\"}]' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts'",
        "type": "json"
      },
      {
        "title": "Update all campaigns",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"enabled\" : \"off\", \"do_all\": true}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "id",
            "description": "<p>campaign updated.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "enabled",
            "description": "<p>New user status of the campaign.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "status",
            "description": "<p>New system status of the campaign.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"id\": \"100\",\n    \"enabled\": \"active\",\n    \"status\": \"active\"\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Campaigns"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/content",
    "title": "Get All Campaigns Content",
    "version": "0.1.0",
    "name": "GetAllBoostContent",
    "group": "Content",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get all the content for current account and the statistics for the given time period.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Numbers",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "today's date",
            "description": "<p>Start date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get All Campaign Content",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/content'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of campaign's content and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.boost_id",
            "description": "<p>Campaign id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.content_id",
            "description": "<p>Content id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.headline",
            "description": "<p>Content headline</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.target_url",
            "description": "<p>Content target_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.image_url",
            "description": "<p>Content image_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.brand_name",
            "description": "<p>Content brand_name</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.admin_status",
            "description": "<p>Content status ('approved','deleted','denied','pending')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.enabled",
            "description": "<p>Content User Status ('active', 'inactive')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.utm_codes",
            "description": "<p>UTM codes</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_position",
            "description": "<p>Average position</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost per conversion for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected content</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": " {\n      \"success\": true,\n      \"data\": [\n      {\n          \"boost_id\" : \"1\",\n          \"content_id\": \"94441\",\n          \"headline\": \"Fox News\",\n          \"target_url\": \"http://fox.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4cabeafbe52602b30d505aaa73eb5a28-0.png\",\n          \"brand_name\": \"fox\",\n          \"status\": \"approved\",\n          \"enabled\": \"active\",\n          \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n          \"avg_position\": \"4.191992\",\n          \"impressions\": \"875349\",\n          \"clicks\": \"1287\",\n          \"conversions\": \"1\",\n          \"ctr\": \"0.1470\",\n          \"avg_cpc\": \"0.15343434\",\n          \"cost\": \"197.4700\",\n          \"cost_per_conv\": \"197.4700\",\n          \"return\": \"54.0000\",\n          \"profit \": \"-143.4700\"\n      },\n      {\n          \"boost_id\" : \"1\",\n          \"content_id\": \"94863\",\n          \"headline\": \"BBC\",\n          \"target_url\": \"http://bbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4casdfsdfsfbe52602b30d505aaa73eb5a28-0.png\",\n          \"brand_name\": \"bbc\",\n          \"status\": \"approved\",\n          \"enabled\": \"inactive\",\n          \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n          \"avg_position\": \"3.036587\",\n          \"impressions\": \"1577539\",\n          \"clicks\": \"9646\",\n          \"conversions\": \"7\",\n          \"ctr\": \"0.6115\",\n          \"avg_cpc\": \"0.08108646\",\n          \"cost\": \"782.1600\",\n          \"cost_per_conv\": \"111.7371\",\n          \"return\": \"378.0000\",\n          \"profit \": \"-404.1600\"\n      },\n      {\n          \"boost_id\" : \"2\",\n          \"content_id\": \"96865\",\n          \"headline\": \"CNN\",\n          \"target_url\": \"http://cnn.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4casdfsdfsfbe52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"cnn\",\n          \"status\": \"approved\",\n          \"enabled\": \"active\",\n          \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n          \"avg_position\": \"4.429076\",\n          \"impressions\": \"1106711\",\n          \"clicks\": \"1178\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.1064\",\n          \"avg_cpc\": \"0.10245331\",\n          \"cost\": \"120.6900\",\n          \"cost_per_conv\": \"0.000\",\n          \"return\": \"0.0000\",\n          \"profit \": \"-120.6900\"\n      },\n      {\n          \"boost_id\" : \"2\",\n          \"content_id\": \"96866\",\n          \"headline\": \"ABC\",\n          \"target_url\": \"http://bbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4544sdfsfbe52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"abc\",\n          \"status\": \"approved\",\n          \"enabled\": \"active\",\n          \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n          \"avg_position\": \"4.803899400000001\",\n          \"impressions\": \"3555458\",\n          \"clicks\": \"3042\",\n          \"conversions\": \"4\",\n          \"ctr\": \"0.0856\",\n          \"avg_cpc\": \"0.14745891\",\n          \"cost\": \"448.5700\",\n          \"cost_per_conv\": \"112.1425\",\n          \"return\": \"216.0000\",\n          \"profit \": \"-232.5700\"\n      },\n      {\n          \"boost_id\" : \"3\",\n          \"content_id\": \"96869\",\n          \"headline\": \"NBC\",\n          \"target_url\": \"http://nbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/123be52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"nbc\",\n          \"status\": \"approved\",\n          \"enabled\": \"inactive\",\n          \"utm_codes\": \"utm_content_id={content_id}&utm_boost_id={boost_id}&utm_targeting={adv_targets}&utm_widget_id={widget_id}\",\n          \"avg_position\": \"4.500694666666667\",\n          \"impressions\": \"948708\",\n          \"clicks\": \"787\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.0830\",\n          \"avg_cpc\": \"0.13548920\",\n          \"cost\": \"106.6300\",\n          \"cost_per_conv\": \"0.000\",\n          \"return\": \"0.0000\",\n          \"profit \": \"-106.6300\"\n       }\n   ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Content"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/:boost_id/content",
    "title": "Get Campaign Content",
    "version": "0.1.0",
    "name": "GetBoostContent",
    "group": "Content",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get all the campaign's current content and the statistics for the given time period.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "admin_status",
            "description": "<p>Admin status of the content. Values: &quot;approved&quot;, &quot;denied&quot;, &quot;pending&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "description": "<p>User status of the content. Values: &quot;active&quot;, &quot;inactive&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "today's date",
            "description": "<p>Start date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Campaign's Current Content",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/content'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of campaign's content and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.content_id",
            "description": "<p>Content id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.headline",
            "description": "<p>Content headline</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.target_url",
            "description": "<p>Content target_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.image_url",
            "description": "<p>Content image_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.brand_name",
            "description": "<p>Content brand_name</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.admin_status",
            "description": "<p>Content status ('approved','deleted','denied','pending')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.creative_denial_reason",
            "description": "<p>Denial Reasons given by administration for denied creatives (separated by comma). 'N/A' otherwise.</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.enabled",
            "description": "<p>Content User Status ('active', 'inactive')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_position",
            "description": "<p>Average position</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of viewable impressions for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost for conversions for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected content</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": " {\n      \"success\": true,\n      \"data\": [\n      {\n          \"content_id\": \"94441\",\n          \"headline\": \"Fox News\",\n          \"target_url\": \"http://fox.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4cabeafbe52602b30d505aaa73eb5a28-0.png\",\n          \"brand_name\": \"fox\",\n          \"admin_status\": \"approved\",\n          \"creative_denial_reason\": \"N/A\"\n          \"enabled\": \"active\",\n          \"avg_position\": \"4.191992\",\n          \"impressions\": \"875349\",\n          \"clicks\": \"1287\",\n          \"conversions\": \"1\",\n          \"ctr\": \"0.1470\",\n          \"avg_cpc\": \"0.15343434\",\n          \"cost\": \"197.4700\",\n          \"cost_per_conv\": \"197.4700\",\n          \"return\": \"54.0000\",\n          \"profit \": \"-143.4700\"\n      },\n      {\n          \"content_id\": \"94863\",\n          \"headline\": \"BBC\",\n          \"target_url\": \"http://bbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4casdfsdfsfbe52602b30d505aaa73eb5a28-0.png\",\n          \"brand_name\": \"bbc\",\n          \"admin_status\": \"denied\",\n          \"creative_denial_reason\": \"['Headline - Un-Approved','Image Quality']\",\n          \"enabled\": \"active\",\n          \"avg_position\": \"3.036587\",\n          \"impressions\": \"1577539\",\n          \"clicks\": \"9646\",\n          \"conversions\": \"7\",\n          \"ctr\": \"0.6115\",\n          \"avg_cpc\": \"0.08108646\",\n          \"cost\": \"782.1600\",\n          \"cost_per_conv\": \"111.737\",\n          \"return\": \"378.0000\",\n          \"profit \": \"-404.1600\"\n      },\n      {\n          \"content_id\": \"96865\",\n          \"headline\": \"CNN\",\n          \"target_url\": \"http://cnn.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4casdfsdfsfbe52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"cnn\",\n          \"admin_status\": \"approved\",\n          \"creative_denial_reason\": \"N/A\"\n          \"enabled\": \"active\",\n          \"avg_position\": \"4.429076\",\n          \"impressions\": \"1106711\",\n          \"clicks\": \"1178\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.1064\",\n          \"avg_cpc\": \"0.10245331\",\n          \"cost\": \"120.6900\",\n          \"cost_per_conv\": \"0.000\",\n          \"return\": \"0.0000\",\n          \"profit \": \"-120.6900\"\n      },\n      {\n          \"content_id\": \"96866\",\n          \"headline\": \"ABC\",\n          \"target_url\": \"http://bbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/4544sdfsfbe52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"abc\",\n          \"admin_status\": \"approved\",\n          \"creative_denial_reason\": \"N/A\"\n          \"enabled\": \"active\",\n          \"avg_position\": \"4.803899400000001\",\n          \"impressions\": \"3555458\",\n          \"clicks\": \"3042\",\n          \"conversions\": \"4\",\n          \"cost_per_conv\": \"0.000\",\n          \"ctr\": \"0.0856\",\n          \"avg_cpc\": \"0.14745891\",\n          \"cost\": \"448.5700\",\n          \"return\": \"112.1425\",\n          \"profit \": \"-232.5700\"\n      },\n      {\n          \"content_id\": \"96869\",\n          \"headline\": \"NBC\",\n          \"target_url\": \"http://nbc.com/easy-tricks-to-drive-traffic-from-content-recommendations/\",\n          \"image_url\": \"https://revcontent.s3.amazonaws.com/assets/content_images/emb/123be52602b30d505234j3hgf28-0.png\",\n          \"brand_name\": \"nbc\",\n          \"admin_status\": \"approved\",\n          \"creative_denial_reason\": \"N/A\"\n          \"enabled\": \"inactive\",\n          \"avg_position\": \"4.500694666666667\",\n          \"impressions\": \"948708\",\n          \"clicks\": \"787\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.0830\",\n          \"avg_cpc\": \"0.13548920\",\n          \"cost\": \"106.6300\",\n          \"cost_per_conv\": \"0.000\",\n          \"return\": \"0.0000\",\n          \"profit \": \"-106.6300\"\n       }\n   ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Content"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/contents/:content_id/widgets/stats",
    "title": "Get Content Widget Stats",
    "version": "0.1.0",
    "name": "GetContentWidgetStats",
    "group": "Content",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list content by widget</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "content_id",
            "description": "<p>Content ID to look for.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date",
            "defaultValue": "today's date",
            "description": "<p>Date for the statistics in Y-m-d format. Defaults to today.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Content Stats (content_id = 756776)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\"\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     \"https://api.revcontent.io/stats/api/v1.0/contents/756776/widgets/stats?date=2017-03-21\"",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>Statistics by widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.pub_id",
            "description": "<p>Publisher ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.widget_id",
            "description": "<p>Widget ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of viewable impressions for widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.vctr",
            "description": "<p>Viewable CTR for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.spend",
            "description": "<p>Spend for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversion",
            "description": "<p>Total number of conversions for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost per conversion for date and widget</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for date and widget</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response (content_id = 756776)",
          "content": "{\n    \"success\":true,\n    \"data\": [\n         {\n             \"widget_id\": \"272\",\n             \"impressions\": \"537\",\n             \"viewable_impressions\": \"874\",\n             \"clicks\": \"1\",\n             \"ctr\": \"0.1862\",\n             \"avg_cpc\": \"0.14000000\",\n             \"spend\": \"0.1400\",\n             \"conversions\": \"0\",\n             \"cost_per_conv\": \"0.000\",\n             \"profit\": \"-0.1400\"\n         },\n         {\n             \"widget_id\": \"300\",\n             \"impressions\": \"15298\",\n             \"viewable_impressions\": \"19298\",\n             \"clicks\": \"51\",\n             \"ctr\": \"0.3334\",\n             \"avg_cpc\": \"0.18568627\",\n             \"spend\": \"9.4700\",\n             \"conversions\": \"0\",\n             \"cost_per_conv\": \"0.000\",\n             \"profit\": \"-9.4700\"\n         },\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Content"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/content/add",
    "title": "Add Campaign Content",
    "version": "0.1.0",
    "name": "PostBoostContentAdd",
    "group": "Content",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Add Content.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String(255)",
            "size": "1..255",
            "optional": false,
            "field": "target_url",
            "description": "<p>Destination image URL. Supports: {CITY}, {STATE}, {COUNTRY}, {BOOST_ID}, {CONTENT_ID}, {ACC_ID}, {WIDGET_ID}</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "image",
            "description": "<p>URL for an image (up to 2MB). Allowed file types: jpg, jpeg, gif, png, webp. Optional if video is provided. Accepts animated gif/webp images. When using an animated image, the first frame is used for non participating sites.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "video",
            "description": "<p>URL for a video (up to 50MB). Allowed file types: mp4, mov. Must be between 1 and 30 seconds long. Optional if image is provided.</p>"
          },
          {
            "group": "Body",
            "type": "String(80)",
            "optional": false,
            "field": "headline",
            "description": "<p>Content headline. Supports: {CITY}, {STATE}, {COUNTRY}</p>"
          },
          {
            "group": "Body",
            "type": "String(250)",
            "optional": false,
            "field": "description",
            "description": "<p>Content body description.</p>"
          },
          {
            "group": "Body",
            "type": "String(30)",
            "optional": false,
            "field": "brand_name",
            "description": "<p>Image/Video provider</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Add content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"target_url\":\"http://www.mcngmarketing.com/17-funny-advertisements-to-tickle-your-funny-bone\",\"image\":\"http://www.mcngmarketing.com/wp-content/uploads/2013/04/Funny-Advertisement-3.jpg\",\"headline\":\"Childsurance {BOOST_ID} – At 18 Your Angry Daughter…\",\"brand_name\":\"Childsunrance {CITY}\"}, \"description\": \"You will never believe the reaction your family will have when you read these hilarious advertisements.\"' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/content/add'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if content was updated.</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "creative.id",
            "description": "<p>Creative Id</p>"
          },
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "creative.status",
            "description": "<p>Creative current status</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"creative\": {\n        \"id\": 900,\n        \"status\": \"pending\"\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Content"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/content",
    "title": "Update Campaign Content",
    "version": "0.1.0",
    "name": "PostBoostContentUpdate",
    "group": "Content",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Update Content.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "id",
            "description": "<p>Content ID. If is not included, provided values will be apply to all contents.</p>"
          },
          {
            "group": "Body",
            "type": "String(255)",
            "size": "1..255",
            "optional": true,
            "field": "target_url",
            "description": "<p>Destination image URL. Supports: {CITY}, {STATE}, {COUNTRY}, {BOOST_ID}, {CONTENT_ID}, {ACC_ID}, {WIDGET_ID}</p>"
          },
          {
            "group": "Body",
            "type": "String(80)",
            "optional": true,
            "field": "headline",
            "description": "<p>Content headline. Supports: {CITY}, {STATE}, {COUNTRY}</p>"
          },
          {
            "group": "Body",
            "type": "String(250)",
            "optional": true,
            "field": "description",
            "description": "<p>Content Body Description.</p>"
          },
          {
            "group": "Body",
            "type": "String(30)",
            "optional": true,
            "field": "brand_name",
            "description": "<p>Image provider</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "defaultValue": "on",
            "description": "<p>Content status. Values: &quot;on&quot;, &quot;off&quot;.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": 690, \"enabled\" : \"on\", \"target_url\":\"http://www.mcngmarketing.com/foo\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/content'",
        "type": "json"
      },
      {
        "title": "Update multiple content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '[{\"id\": 690, \"enabled\": \"on\", \"target_url\":\"http://www.mcngmarketing.com/foo\"},{\"id\": 790, \"enabled\" : \"off\"}]' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/content'",
        "type": "json"
      },
      {
        "title": "Update all content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"enabled\" : \"off\", \"target_url\":\"http://www.mcngmarketing.com/foo\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/content'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if content was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response (Update content)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"2267765\",\n            \"status\": \"pending\",\n        }\n    ]\n}",
          "type": "json"
        },
        {
          "title": "Success-Response (Update multiple or all content)",
          "content": "{ \"success\": true }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Content"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/conversions",
    "title": "Get All Conversions",
    "version": "0.1.0",
    "name": "GetConversions",
    "group": "Conversions",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get All Conversions</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;'</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get All Conversions",
        "content": "curl -X GET \\\n     https://api.revcontent.io/stats/api/v1.0/conversions \\\n     -H 'authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d' \\\n     -H 'cache-control: no-cache' \\\n     -H 'content-type: application/json'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of user conversions</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "data.id",
            "description": "<p>Conversion id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Conversion name</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.amount",
            "description": "<p>Conversion amount</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\":true,\n    \"data\": [\n               {\n                   \"id\": 1,\n                   \"name\": \"Conversion 1\",\n                   \"amount\": \"1.75\"\n               },\n               {\n                   \"id\": 2,\n                   \"name\": \"Conversion 2\",\n                   \"amount\": \"1.00\"\n               },\n               {\n                   \"id\": 3,\n                   \"name\": \"Conversion 3\",\n                   \"amount\": \"2.00\"\n               }\n           ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 100 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Conversions"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/conversions/add",
    "title": "Add Conversion",
    "version": "0.1.0",
    "name": "PostConversionAdd",
    "group": "Conversions",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Add Conversion.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>Conversion name</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "amount",
            "description": "<p>Conversion amount</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Add Conversion",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"name\":\"Conversion 1\",\"amount\":\"1.75\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/conversions/add'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if conversion was updated.</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "conversion_id",
            "description": "<p>Conversion ID</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"conversion_id\": 900\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Conversions"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/conversions/:conversion_id/delete",
    "title": "Delete Conversion",
    "version": "0.1.0",
    "name": "PostConversionDelete",
    "group": "Conversions",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Delete Conversion</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Delete Conversion",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/conversions/308/delete'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if the conversion was deleted.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "\n{\n   \"success\": true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Conversions"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/conversions/:conversion_id/update",
    "title": "Update Conversion",
    "version": "0.1.0",
    "name": "PostConversionEdit",
    "group": "Conversions",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Update Conversion Settings</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "conversion_id",
            "description": "<p>Conversion ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "name",
            "description": "<p>Conversion name.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "amount",
            "description": "<p>Conversion amount.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update Conversion",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"name\": \"New Conversion Name\", \"amount\": \"1.99\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/conversions/308/update'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if the conversion was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "\n{\n   \"success\": true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Conversions"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/browsers",
    "title": "Get Browsers",
    "version": "0.1.0",
    "name": "GetBrowsers",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get supported browser list</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Languages",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/languages'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of Browsers</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Browser id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Browser name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"Browser name 1\"\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"Browser name 2\"\n        },\n        {\n            \"id\": \"3\",\n            \"name\": \"Browser name 3\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/browsers_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/countries",
    "title": "Get Countries",
    "version": "0.1.0",
    "name": "GetCountries",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of Country codes</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get countries",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/countries'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of countries</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Country id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Country name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n           \"id\": \"A2\",\n           \"name\": \"Satellite Provider\"\n        },\n        {\n           \"id\": \"AD\",\n           \"name\": \"Andorra\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/countries_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/devices",
    "title": "Get Devices",
    "version": "0.1.0",
    "name": "GetDevices",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get supported devices</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Devices",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/devices'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of devices</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Device id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Device name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": " {\n   \"success\": true,\n   \"data\": [\n       {\n           \"id\": \"1\",\n           \"name\": \"device 1\"\n       },\n       {\n           \"id\": \"2\",\n           \"name\": \"device 2\"\n       },\n       {\n           \"id\": \"3\",\n           \"name\": \"device 3\"\n       }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/devices_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/dmas",
    "title": "Get DMA List",
    "version": "0.1.0",
    "name": "GetDmas",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of DMAs</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get dmas",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/dmas'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of DMAs</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>DMA ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>DMA Name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n           \"id\": \"501\",\n           \"name\": \"New York\"\n        },\n        {\n           \"id\": \"803\",\n           \"name\": \"Los Angeles\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/dmas_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/languages",
    "title": "Get Languages",
    "version": "0.1.0",
    "name": "GetLanguages",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get supported languages list</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Languages",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/languages'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of languages</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Language id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Language name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"language name 1\"\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"language name 2\"\n        },\n        {\n            \"id\": \"3\",\n            \"name\": \"language name 3\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/languages_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/os",
    "title": "Get Operating Systems List",
    "version": "0.1.0",
    "name": "GetOperatingSystems",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of Operating Systems For All Devices</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Operating Systems",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/os'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of Operating Systems</p>"
          },
          {
            "group": "Success 200",
            "type": "String[]",
            "optional": false,
            "field": "data.type",
            "description": "<p>Device Type</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.type.id",
            "description": "<p>Operating System ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.type.name",
            "description": "<p>Operating System Name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"4\",\n            \"name\": \"android\",\n            \"allowed_devices\": [\n                \"mobile\",\n                \"tablet\"\n            ]\n        },\n        {\n            \"id\": \"5\",\n            \"name\": \"ios\",\n            \"allowed_devices\": [\n                \"mobile\",\n                \"tablet\"\n            ]\n        },\n        {\n            \"id\": \"6\",\n            \"name\": \"windows\",\n            \"allowed_devices\": [\n                \"mobile\",\n                \"tablet\"\n            ]\n        },\n        {\n            \"id\": \"7\",\n            \"name\": \"macos\",\n            \"allowed_devices\": [\n                \"desktop\"\n            ]\n        },\n        {\n            \"id\": \"8\",\n            \"name\": \"windows\",\n            \"allowed_devices\": [\n                \"desktop\"\n            ]\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/os_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/regions",
    "title": "Get Regions",
    "version": "0.1.0",
    "name": "GetRegions",
    "group": "Helpers",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of Regions by Country code</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "country",
            "description": "<p>Country Code</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get regions",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/regions?country=US'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of Regions</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Region id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Region name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n           \"id\": \"FL\",\n           \"name\": \"Florida\"\n        },\n        {\n           \"id\": \"CA\",\n           \"name\": \"California\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/regions_interface.php",
    "groupTitle": "Helpers"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/sub_accounts/add_account",
    "title": "Add Account",
    "version": "0.1.0",
    "name": "AddAccount",
    "group": "Sub_Accounts",
    "permission": [
      {
        "name": "Advertiser, Publisher"
      }
    ],
    "description": "<p>Add Account Data</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>Full name</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "email",
            "description": "<p>User email</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "permissions",
            "description": "<p>Permission. Allowed options: <code>full</code> or <code>child</code></p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Edit Account",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/sub_accounts/add_account'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if account is added.</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>Sub Account Data</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "data.account_id",
            "description": "<p>Created Account ID</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": {\n        \"account_id\": 2323444\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Missing parameter\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/sub_accounts_interface.php",
    "groupTitle": "Sub_Accounts"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/sub_accounts/edit_account",
    "title": "Edit Account",
    "version": "0.1.0",
    "name": "EditAccount",
    "group": "Sub_Accounts",
    "permission": [
      {
        "name": "Advertiser, Publisher"
      }
    ],
    "description": "<p>Edit Account Data</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "user_id",
            "description": "<p>Sub Account ID</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "email",
            "description": "<p>User email</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "name",
            "description": "<p>Full name</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "permissions",
            "description": "<p>Permission. Allowed options: <code>full</code> or <code>child</code></p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Edit Account",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/sub_accounts/edit_account'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if account is updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Missing parameter\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/sub_accounts_interface.php",
    "groupTitle": "Sub_Accounts"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/sub_accounts/list_accounts",
    "title": "List Accounts",
    "version": "0.1.0",
    "name": "ListAccounts",
    "group": "Sub_Accounts",
    "permission": [
      {
        "name": "Advertiser, Publisher"
      }
    ],
    "description": "<p>Get list of sub accounts</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "List Accounts",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/sub_accounts/list_accounts'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of Sub Accounts</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.user_id",
            "description": "<p>Account ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.user_email",
            "description": "<p>Account Email</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.status",
            "description": "<p>Account Status</p>"
          },
          {
            "group": "Success 200",
            "type": "DateTime",
            "optional": false,
            "field": "data.created",
            "description": "<p>Account Created Date</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"user_id\": \"1\",\n            \"user_email\": \"user@example.com\",\n            \"status\": \"active\",\n            \"permissions\": \"full\",\n            \"created\": \"2021-05-01 14:15:10\"\n        },\n        {\n            \"user_id\": \"2\",\n            \"user_email\": \"another@example.com\",\n            \"status\": \"pending\",\n            \"permissions\": \"child\",\n            \"created\": \"2021-05-02 14:15:10\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/sub_accounts_interface.php",
    "groupTitle": "Sub_Accounts"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/sub_accounts/update_account_status",
    "title": "Update Account Status",
    "version": "0.1.0",
    "name": "UpdateAccountStatus",
    "group": "Sub_Accounts",
    "permission": [
      {
        "name": "Advertiser, Publisher"
      }
    ],
    "description": "<p>Enable or Disable Sub Account</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": false,
            "field": "user_id",
            "description": "<p>Sub Account ID</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "status",
            "defaultValue": "active",
            "description": "<p>Account status. Allowed options: <code>active</code> or <code>terminated</code></p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update Account Status",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/sub_accounts/update_account_status'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if account was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Missing parameter\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/sub_accounts_interface.php",
    "groupTitle": "Sub_Accounts"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/:boost_id/widgets",
    "title": "Get Campaign Widget Targets",
    "version": "0.1.0",
    "name": "GetBoostWidgets",
    "group": "Targeting",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get all the campaign's current widget targets and the statistics for the given time period.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "description": "<p>Status of the targets. Values: &quot;enabled&quot;, &quot;disabled&quot;.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "today's date",
            "description": "<p>Start date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 1000. Default 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Campaign's Current Widget Targets",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/widgets'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of campaign's widget targets and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.widget_id",
            "description": "<p>Widget id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.domain",
            "description": "<p>Widget Domain</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.enabled",
            "description": "<p>Content status ('disabled','enabled')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.bid_type",
            "description": "<p>Campaign bid type</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.bid",
            "description": "<p>Target bid amount</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.avg_cpc",
            "description": "<p>Average CPC for selected target (Returned for CPC bids)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for selected target (Returned for CPC bids)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.viewable_impressions",
            "description": "<p>Total number of viewable impressions for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.conversions",
            "description": "<p>Total number of conversion for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost",
            "description": "<p>Cost for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.cost_per_conv",
            "description": "<p>Cost per conversion for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.return",
            "description": "<p>Return for selected target</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.profit",
            "description": "<p>Profit for selected target</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": " {\n      \"success\": true,\n      \"data\": [\n      {\n          \"widget_id\": \"88\",\n          \"domain\": \"revcontent.com\",\n          \"enabled\": \"enabled\",\n          \"bid_type\": \"cpc\",\n          \"bid\": \"0.22\",\n          \"viewable_impressions\": \"456\",\n          \"clicks\": \"0\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.0000\",\n          \"cost\": \"0.0000\",\n          \"cost_per_conv\": \"0.0000\",\n          \"return\": \"0.0000\",\n          \"profit\": \"0.0000\"\n      },\n      {\n          \"widget_id\": \"1761961\",\n          \"domain\": \"revcontent.com\",\n          \"enabled\": \"enabled\",\n          \"bid_type\": \"cpc\",\n          \"bid\": \"0.24\",\n          \"viewable_impressions\": \"476\",\n          \"clicks\": \"0\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.0000\",\n          \"cost\": \"0.0000\",\n          \"cost_per_conv\": \"0.0000\",\n          \"return\": \"0.0000\",\n          \"profit\": \"0.0000\"\n      },\n      {\n          \"widget_id\": \"86\",\n          \"domain\": \"revcontent.com\",\n          \"enabled\": \"disabled\",\n          \"bid_type\": \"cpc\",\n          \"bid\": \"0.29\",\n          \"viewable_impressions\": \"522\",\n          \"impressions\": \"0\",\n          \"clicks\": \"0\",\n          \"conversions\": \"0\",\n          \"ctr\": \"0.0000\",\n          \"cost\": \"0.0000\",\n          \"cost_per_conv\": \"0.0000\",\n          \"return\": \"0.0000\",\n          \"profit\": \"0.0000\"\n      }\n   ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Targeting"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/widgets",
    "title": "Update Campaign Widget Targeting",
    "version": "0.1.0",
    "name": "PostBoostWidgets",
    "group": "Targeting",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Update widget targets</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "boost_id",
            "description": "<p>Campaign Id.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "id",
            "description": "<p>Target ID.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "bid",
            "defaultValue": "Campaign CPC",
            "description": "<p>Target bid. Min: 0.001 Max: 3.000. Limit 3 decimals. If is a new target and value is not provided, will use default.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "defaultValue": "on",
            "description": "<p>Target status. Values: &quot;on&quot;, &quot;off&quot;.</p>"
          },
          {
            "group": "Body",
            "type": "boolean",
            "optional": true,
            "field": "reset",
            "description": "<p>Reset to default bid if true value is passed.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update target",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": 32, \"enabled\" : \"on\", \"bid\" : 0.001}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/widgets'",
        "type": "json"
      },
      {
        "title": "Update multiple targets",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '[{\"id\": 28, \"enabled\" : \"on\", \"bid\" : 0.400},{\"id\": 32, \"enabled\" : \"off\", \"bid\" : 0.270}]' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/widgets'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if target was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{ \"success\": true }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Targeting"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/widgets",
    "title": "Get All Widgets",
    "version": "0.1.0",
    "name": "GetAllWidgets",
    "group": "Widget",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Get list of widgets</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "widget",
            "description": "<p>Filter stats by a specific widget. For example &quot;1234&quot;. Defaults to all widgets.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "domain",
            "description": "<p>Filter widgets by a specific domain. For example &quot;revcontent.com&quot;. Defaults to all domains.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "device",
            "description": "<p>Filter stats by a specific device. Values: &quot;all&quot;, &quot;desktop&quot;, &quot;tablet&quot;, &quot;mobile&quot;, &quot;unknown&quot;. Defaults to all.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "first of the month",
            "description": "<p>Start date for the statistics in Y-m-d format. Defaults to first of the current month.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format. Defaults to today.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "aggregate",
            "defaultValue": "no",
            "description": "<p>If 'yes', statistics aggregated by date are retrieved.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Widgets",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets'",
        "type": "json"
      },
      {
        "title": "Get Widgets (Aggregate)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets?date_from=2016-11-06&date_to=2016-11-07&aggregate=yes'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widgets and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Widget id (if 'aggregate' is 'no')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.widget_imps",
            "description": "<p>Number of widget impressions</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.page_views",
            "description": "<p>Number of page views</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_ctr",
            "description": "<p>Sponsored ad click through rate</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_clicks",
            "description": "<p>Sponsored ad clicks</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_cpc",
            "description": "<p>Sponsored ad average cost per click</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_rpm",
            "description": "<p>Sponsored ad revenue per milli</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_revenue",
            "description": "<p>Sponsored ad total revenue</p>"
          }
        ],
        "Aggregate": [
          {
            "group": "Aggregate",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Aggregate",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widgets and their statistics</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.date",
            "description": "<p>Stats date  (if 'aggregate' is 'yes')</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.widget_imps",
            "description": "<p>Number of widget impressions</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.page_views",
            "description": "<p>Number of page views</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_ctr",
            "description": "<p>Sponsored ad click through rate</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_clicks",
            "description": "<p>Sponsored ad clicks</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_cpc",
            "description": "<p>Sponsored ad average cost per click</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_rpm",
            "description": "<p>Sponsored ad revenue per milli</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_revenue",
            "description": "<p>Sponsored ad total revenue</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\" : true,\n    \"data\": [\n               {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                    \"widget_imps\": \"149756\",\n                    \"page_views\": \"149756\",\n                    \"ad_ctr\": \"7.1189\",\n                    \"ad_clicks\": \"10661\",\n                    \"ad_cpc\": \"0.05792852\",\n                    \"ad_rpm\": \"4.123881513929325035390902\",\n                    \"ad_revenue\": \"617.57600000000000000000\"\n                },\n                {\n                    \"id\": \"219\",\n                    \"name\": \"Test Widget 2\",\n                    \"widget_imps\": \"107\",\n                    \"page_views\": \"107\",\n                    \"ad_ctr\": \"8.4112\",\n                    \"ad_clicks\": \"9\",\n                    \"ad_cpc\": \"0.27294444\",\n                    \"ad_rpm\": \"22.957943925233644859813084\",\n                    \"ad_revenue\": \"2.45650000000000000000\"\n                },\n                {\n                    \"id\": \"220\",\n                    \"name\": \"Test Widget 3\",\n                    \"widget_imps\": \"25977\",\n                    \"page_views\": \"25977\",\n                    \"ad_ctr\": \"0.0154\",\n                    \"ad_clicks\": \"4\",\n                    \"ad_cpc\": \"0.06375000\",\n                    \"ad_rpm\": \"0.009816376024945143781037\",\n                    \"ad_revenue\": \"0.25500000000000000000\"\n                },\n                {\n                    \"id\": \"221\",\n                    \"name\": \"Test Widget 4\",\n                    \"widget_imps\": \"121904\",\n                    \"page_views\": \"121904\",\n                    \"ad_ctr\": \"2.1845\",\n                    \"ad_clicks\": \"2663\",\n                    \"ad_cpc\": \"0.06075122\",\n                    \"ad_rpm\": \"1.327113958524740779629872\",\n                    \"ad_revenue\": \"161.78050000000000000000\"\n                 },\n                 {\n                    \"id\": \"222\",\n                    \"name\": \"Test Widget 5\",\n                    \"widget_imps\": \"99914\",\n                    \"page_views\": \"99914\",\n                    \"ad_ctr\": \"0.0230\",\n                    \"ad_clicks\": \"23\",\n                    \"ad_cpc\": \"0.54991304\",\n                    \"ad_rpm\": \"0.126588866425125608022899\",\n                    \"ad_revenue\": \"12.64800000000000000000\"\n                }\n           ]\n       }",
          "type": "json"
        },
        {
          "title": "Success-Response (Aggregate)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-11-06\",\n            \"widget_imps\": \"12144860\",\n            \"page_views\": \"12144860\",\n            \"ad_ctr\": \"3.9430\",\n            \"ad_clicks\": \"478868\",\n            \"ad_cpc\": \"0.02054821\",\n            \"ad_rpm\": \"0.810209421928289004566540\",\n            \"ad_revenue\": \"9839.88000000000000000000\"\n        },\n        {\n            \"date\": \"2016-11-07\",\n            \"widget_imps\": \"8855589\",\n            \"page_views\": \"8855589\",\n            \"ad_ctr\": \"3.7819\",\n            \"ad_clicks\": \"334910\",\n            \"ad_cpc\": \"0.02145326\",\n            \"ad_rpm\": \"0.811342080125895634948731\",\n            \"ad_revenue\": \"7184.91200000000000000000\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/widgets_geo",
    "title": "Get All Widgets Geo Stats",
    "version": "0.1.0",
    "name": "GetAllWidgetsGeo",
    "group": "Widget",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Get list of widgets and their stats broken down by country</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "country",
            "description": "<p>Filter stats by a specific country. Values: ISO 3166-1 alpha-2 country codes, for example &quot;US&quot;, or &quot;unknown&quot;. Defaults to all countries.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "widget",
            "description": "<p>Filter stats by a specific widget. For example &quot;1234&quot;. Defaults to all widgets.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "domain",
            "description": "<p>Filter widgets by a specific domain. For example &quot;revcontent.com&quot;. Defaults to all domains.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "device",
            "description": "<p>Filter stats by a specific device. Values: &quot;all&quot;, &quot;desktop&quot;, &quot;tablet&quot;, &quot;mobile&quot;, &quot;unknown&quot;. Defaults to all.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "today's date",
            "description": "<p>Start date for the statistics in Y-m-d format. Defaults to today.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "today's date",
            "description": "<p>End date for the statistics in Y-m-d format. Defaults to today. Maximum of 60 days after the Start Date.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 100.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "aggregate",
            "defaultValue": "no",
            "description": "<p>If 'yes', statistics aggregated by date are retrieved.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Widgets",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets'",
        "type": "json"
      },
      {
        "title": "Get Widgets (Aggregate)",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets?date_from=2016-11-06&date_to=2016-11-07&aggregate=yes'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widgets and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.id",
            "description": "<p>Widget id (if 'aggregate' is 'no')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.name",
            "description": "<p>Widget name</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.country",
            "description": "<p>ISO 3166-1 alpha-2 country code or null (for unknown country)</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.widget_imps",
            "description": "<p>Number of widget impressions</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.page_views",
            "description": "<p>Number of page views</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_ctr",
            "description": "<p>Sponsored ad click through rate</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_clicks",
            "description": "<p>Sponsored ad clicks</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_cpc",
            "description": "<p>Sponsored ad average cost per click</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_rpm",
            "description": "<p>Sponsored ad revenue per milli</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ad_revenue",
            "description": "<p>Sponsored ad total revenue</p>"
          }
        ],
        "Aggregate": [
          {
            "group": "Aggregate",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Aggregate",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widgets and their statistics</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.date",
            "description": "<p>Stats date  (if 'aggregate' is 'yes')</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.country",
            "description": "<p>ISO 3166-1 alpha-2 country code</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.widget_imps",
            "description": "<p>Number of widget impressions</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.page_views",
            "description": "<p>Number of page views</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_ctr",
            "description": "<p>Sponsored ad click through rate</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_clicks",
            "description": "<p>Sponsored ad clicks</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_cpc",
            "description": "<p>Sponsored ad average cost per click</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_rpm",
            "description": "<p>Sponsored ad revenue per milli</p>"
          },
          {
            "group": "Aggregate",
            "type": "String",
            "optional": false,
            "field": "data.ad_revenue",
            "description": "<p>Sponsored ad total revenue</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\" : true,\n    \"data\": [\n               {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                    \"country\": \"AU\",\n                    \"widget_imps\": \"149756\",\n                    \"widget_imps\": \"149756\",\n                    \"ad_ctr\": \"7.1189\",\n                    \"ad_clicks\": \"10661\",\n                    \"ad_cpc\": \"0.05792852\",\n                    \"ad_rpm\": \"4.123881513929325035390902\",\n                    \"ad_revenue\": \"617.57600000000000000000\"\n                },\n                {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                    \"country\": \"BR\",\n                    \"widget_imps\": \"107\",\n                    \"widget_imps\": \"107\",\n                    \"ad_ctr\": \"8.4112\",\n                    \"ad_clicks\": \"9\",\n                    \"ad_cpc\": \"0.27294444\",\n                    \"ad_rpm\": \"22.957943925233644859813084\",\n                    \"ad_revenue\": \"2.45650000000000000000\"\n                },\n                {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                         \"country\": \"CA\",\n                    \"widget_imps\": \"25977\",\n                    \"widget_imps\": \"25977\",\n                    \"ad_ctr\": \"0.0154\",\n                    \"ad_clicks\": \"4\",\n                    \"ad_cpc\": \"0.06375000\",\n                    \"ad_rpm\": \"0.009816376024945143781037\",\n                    \"ad_revenue\": \"0.25500000000000000000\"\n                },\n                {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                    \"country\": \"GB\",\n                    \"widget_imps\": \"121904\",\n                    \"widget_imps\": \"121904\",\n                    \"ad_ctr\": \"2.1845\",\n                    \"ad_clicks\": \"2663\",\n                    \"ad_cpc\": \"0.06075122\",\n                    \"ad_rpm\": \"1.327113958524740779629872\",\n                    \"ad_revenue\": \"161.78050000000000000000\"\n                 },\n                 {\n                    \"id\": \"218\",\n                    \"name\": \"Test Widget 1\",\n                    \"country\": \"US\",\n                    \"widget_imps\": \"99914\",\n                    \"widget_imps\": \"99914\",\n                    \"ad_ctr\": \"0.0230\",\n                    \"ad_clicks\": \"23\",\n                    \"ad_cpc\": \"0.54991304\",\n                    \"ad_rpm\": \"0.126588866425125608022899\",\n                    \"ad_revenue\": \"12.64800000000000000000\"\n                }\n           ]\n       }",
          "type": "json"
        },
        {
          "title": "Success-Response (Aggregate)",
          "content": "{\n    \"success\": true,\n    \"data\": [\n        {\n            \"date\": \"2016-11-06\",\n            \"country\": \"AU\",\n            \"widget_imps\": \"12144860\",\n            \"page_views\": \"12144860\",\n            \"ad_ctr\": \"3.9430\",\n            \"ad_clicks\": \"478868\",\n            \"ad_cpc\": \"0.02054821\",\n            \"ad_rpm\": \"0.810209421928289004566540\",\n            \"ad_revenue\": \"9839.88000000000000000000\"\n        },\n        {\n            \"date\": \"2016-11-06\",\n            \"country\": \"BR\",\n            \"widget_imps\": \"8855589\",\n            \"page_views\": \"8855589\",\n            \"ad_ctr\": \"3.7819\",\n            \"ad_clicks\": \"334910\",\n            \"ad_cpc\": \"0.02145326\",\n            \"ad_rpm\": \"0.811342080125895634948731\",\n            \"ad_revenue\": \"7184.91200000000000000000\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 400,\n            \"title\": \"Invalid Parameters\",\n            \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/widgets/:widget_id/revsub",
    "title": "Get Sub ID Stats",
    "version": "0.1.0",
    "name": "GetSubIDStats",
    "group": "Widget",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Get list of sub id statistic csv's for a specific widget. The stats are not realtime and are behind by an hour.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "widget_id",
            "description": "<p>Widget ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "date",
            "description": "<p>Date of statistics in Y-m-d format <code>(EST timezone)</code>.</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": true,
            "field": "hour",
            "defaultValue": "Returns stats for all available hours of the date",
            "description": "<p>Get stats for a specific hour. Should be in 24-hour format and between 00-23 <code>(EST timezone)</code>. For ex: &quot;hour=01&quot;</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Sub ID Record List",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/10985/revsub?date=2016-03-15'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Array[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of records that contain statistics</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\": [\n               \"https://revcontent.s3.amazonaws.com/sub_id_stats/20160315/30/20160315_10985_sub_id_stats_0.csv.gz?AWSAccessKeyId=AKIAIKOO33W7XD356BIA&Expires=1460495122&Signature=4%2BcSnsC1rVWCCbasazNVrv8blFQ%3D\",\n               \"https://revcontent.s3.amazonaws.com/sub_id_stats/20160315/30/20160315_10985_sub_id_stats_1.csv.gz?AWSAccessKeyId=AKIAIKOO33W7XD356BIA&Expires=1460495122&Signature=Jyd5F77HIho1xcYlhT2kuo0bzMw%3D\",\n               \"https://revcontent.s3.amazonaws.com/sub_id_stats/20160315/30/20160315_10985_sub_id_stats_2.csv.gz?AWSAccessKeyId=AKIAIKOO33W7XD356BIA&Expires=1460495122&Signature=Y6%2F86vJEGZq8NqY5aaOPpCzjAdE%3D\"\n            ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": "HTTP/1.1 400 Bad Request\n{\n    \"success\": false,\n    \"errors\": [\n        {\n           \"code\": 400,\n           \"title\": \"Invalid Parameters\",\n           \"detail\": \"Invalid Parameters sent\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/widgets/:widget_id/internal_content",
    "title": "Get Widget Internal Content",
    "version": "0.1.0",
    "name": "GetWidgetInternalContent",
    "group": "Widget_Internal_Content",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Get all the widgets's internal content and the statistics for the given time period.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "widget_id",
            "description": "<p>Widget ID.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "status",
            "description": "<p>User status of the content. Values: &quot;enabled&quot;, &quot;disabled&quot;. If is not passed, all status are included.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "devices",
            "description": "<p>List of devices. Values: &quot;desktop, tablet, phone, unknown&quot;. If is not passed, all devices are included.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "date_from",
            "defaultValue": "first day of the month",
            "description": "<p>Start date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "date_to",
            "defaultValue": "last day of the month date",
            "description": "<p>End date for the statistics in Y-m-d format.</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "limit",
            "defaultValue": "100",
            "description": "<p>Number of records to return. Max 100.</p>"
          },
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "offset",
            "defaultValue": "0",
            "description": "<p>Offset for the records to return.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get Widget's Current Content",
        "content": "curl -X GET \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/6512/internal_content?limit=5,devices=tablet,phone'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>true</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widget's internal content and their statistics</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.trending_id",
            "description": "<p>Content id</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.headline",
            "description": "<p>Content headline</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.target_url",
            "description": "<p>Content target_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.image_url",
            "description": "<p>Content image_url</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.status",
            "description": "<p>Content status ('approved','deleted','denied','pending')</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.impressions",
            "description": "<p>Total number of impressions for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.clicks",
            "description": "<p>Total number of clicks for selected content</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "data.ctr",
            "description": "<p>CTR for selected date</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"data\":\n            [\n                {\n                    \"impressions\": \"0\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"image_url\": \"https://www.revcontent.com/assets/img/v2/widgets/cookie-cutter.png\",\n                    \"target_url\": \"http://www.revcontent.com/link2\",\n                    \"headline\": \"Cookie cutter rules\",\n                    \"provider\": \"Foxnews\",\n                    \"created\": \"2016-07-13 18:28:24\",\n                    \"updated\": \"2016-07-13 18:28:24\",\n                    \"trending_id\": \"2099893\",\n                    \"status\": \"enabled\"\n                },\n                {\n                    \"impressions\": \"0\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"image_url\": \"https://www.revcontent.com/assets/img/v2/widgets/cookie-cutter.png\",\n                    \"target_url\": \"http://www.revcontent.com/link1\",\n                    \"headline\": \"Cookie cutter rules\",\n                    \"provider\": \"Foxnews\",\n                    \"created\": \"2016-07-13 15:39:30\",\n                    \"updated\": \"2016-07-13 15:39:30\",\n                    \"trending_id\": \"2099892\",\n                    \"status\": \"enabled\"\n                },\n                {\n                    \"impressions\": \"0\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"image_url\": \"https://www.revcontent.com/assets/img/v2/widgets/cookie-cutter.png\",\n                    \"target_url\": \"https://www.revcontent.com\",\n                    \"headline\": \"Cookie cutter rules\",\n                    \"provider\": \"Foxnews\",\n                    \"created\": \"2016-07-13 15:38:56\",\n                    \"updated\": \"2016-07-13 15:38:56\",\n                    \"trending_id\": \"2099891\",\n                    \"status\": \"enabled\"\n                },\n                {\n                    \"impressions\": \"0\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"image_url\": \"https://revcontent-production.s3.amazonaws.com/prod/assets/content_images/emb/fe5230513a5da294c39d0abdfb1406e0-0.png\",\n                    \"target_url\": \"http://blog.revcontent.com/revcontent-honored-with-best-places-to-work-in-tampa-bay/\",\n                    \"headline\": \"RevContent Honored with Best Places to Work in Tampa Bay!\",\n                    \"provider\": \"RevContent\",\n                    \"created\": \"2016-04-30 20:00:04\",\n                    \"updated\": \"2016-04-30 20:00:04\",\n                    \"trending_id\": \"1759587\",\n                    \"status\": \"enabled\"\n                },\n                {\n                    \"impressions\": \"0\",\n                    \"clicks\": \"0\",\n                    \"ctr\": \"0.0000\",\n                    \"image_url\": \"https://revcontent-production.s3.amazonaws.com/prod/assets/content_images/emb/f29f1fe12df90411b7d54f5cbd878b34-0.png\",\n                    \"target_url\": \"http://blog.revcontent.com/revcontent-video-overlay-launched-for-seamless-content-context/\",\n                    \"headline\": \"RevContent Video Overlay Launched for Seamless Content Context\",\n                    \"provider\": \"RevContent\",\n                    \"created\": \"2016-04-17 16:00:01\",\n                    \"updated\": \"2016-04-17 16:00:01\",\n                    \"trending_id\": \"1622432\",\n                    \"status\": \"enabled\"\n                }\n            ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": "HTTP/1.1 400 Bad Request\n      {\n         \"errors\": {\n             \"success\": false,\n             \"status\": 400,\n             \"title\": \"Invalid parameters.\"\n         }\n     }",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget_Internal_Content"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/widgets/:widget_id/internal_content/add",
    "title": "Add Widget Internal Content",
    "version": "0.1.0",
    "name": "PostWidgetInternalContentAdd",
    "group": "Widget_Internal_Content",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Add Widget Internal Content.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "widget_id",
            "description": "<p>Widget ID.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String(255)",
            "size": "1..255",
            "optional": false,
            "field": "target_url",
            "description": "<p>Destination image URL. Supports: {CITY}, {STATE}, {COUNTRY}, {BOOST_ID}, {CONTENT_ID}, {ACC_ID}, {WIDGET_ID}</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "image",
            "description": "<p>URL for an image (up to 2MB). Allowed file types: jpg, jpeg, gif, png</p>"
          },
          {
            "group": "Body",
            "type": "String(80)",
            "optional": false,
            "field": "headline",
            "description": "<p>Content headline. Supports: {CITY}, {STATE}, {COUNTRY}</p>"
          },
          {
            "group": "Body",
            "type": "String(30)",
            "optional": false,
            "field": "provider",
            "description": "<p>Content provider brand name - Open to direct sell publishers only</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Add widget internal content",
        "content": "curl -X POST \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Authorization: Bearer 552a2cb6cb120a001ea369be9ae21884735a6bd2\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"target_url\" : \"https://www.revcontent.com\",\"image\" : \"https://www.revcontent.com/assets/img/v2/widgets/cookie-cutter.png\",\"headline\" : \"Cookie cutter rules\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/6512/internal_content/add'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if content was updated.</p>"
          },
          {
            "group": "Success 200",
            "type": "Number",
            "optional": false,
            "field": "content.id",
            "description": "<p>Content Id</p>"
          },
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "content.enabled",
            "description": "<p>Content enabled or not</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"success\": true,\n    \"content\": {\n        \"id\": 2099892,\n        \"enabled\": true\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget_Internal_Content"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/widgets/:widget_id/internal_content/update",
    "title": "Update Widget Internal Content",
    "version": "0.1.0",
    "name": "PostWidgetInternalContentUpdate",
    "group": "Widget_Internal_Content",
    "permission": [
      {
        "name": "Publisher"
      }
    ],
    "description": "<p>Update Widget Internal Content.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "widget_id",
            "description": "<p>Widget ID.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "Number",
            "optional": true,
            "field": "id",
            "description": "<p>Content ID. If is not included, provided values will be apply to all contents.</p>"
          },
          {
            "group": "Body",
            "type": "String",
            "optional": true,
            "field": "enabled",
            "description": "<p>Content status. Values: &quot;on&quot;, &quot;off&quot;.</p>"
          },
          {
            "group": "Body",
            "type": "String(255)",
            "size": "1..255",
            "optional": true,
            "field": "target_url",
            "description": "<p>Destination image URL. Supports: {CITY}, {STATE}, {COUNTRY}, {BOOST_ID}, {CONTENT_ID}, {ACC_ID}, {WIDGET_ID}</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Update content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": 690, \"enabled\" : \"on\", \"target_url\":\"http://www.mcngmarketing.com/foo\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/6512/internal_content/update'",
        "type": "json"
      },
      {
        "title": "Update multiple content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '[{\"id\": 690, \"enabled\": \"on\", \"target_url\":\"http://www.mcngmarketing.com/foo\"},{\"id\": 790, \"enabled\" : \"off\"}]' \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/6512/internal_content/update'",
        "type": "json"
      },
      {
        "title": "Update all content",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"enabled\" : \"off\", \"target_url\":\"http://www.mcngmarketing.com/foo\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/widgets/6512/internal_content/update'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if content was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{ \"success\": true }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid ID value\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/widgets_interface.php",
    "groupTitle": "Widget_Internal_Content"
  },
  {
    "type": "get",
    "url": "/stats/api/v1.0/boosts/:boost_id/targets/blacklist/widgets",
    "title": "Get list of blacklisted widget ids",
    "version": "0.1.0",
    "name": "GetTargetsOptimizerWidgets",
    "group": "Widget_Optimizer",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Get list of widget ids that are blacklisted</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Get targets optimizer widgets",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/targets/blacklist/widgets'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data",
            "description": "<p>List of widget ids</p>"
          },
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "data.id",
            "description": "<p>Widget id</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{\n    \"data\": [\n        {\n            \"id\": \"100\"\n        },\n        {\n            \"id\": \"123\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 500": [
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "code",
            "description": "<p>Error id</p>"
          },
          {
            "group": "Error 500",
            "type": "String",
            "optional": false,
            "field": "title",
            "description": "<p>Error description</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Error-Response",
          "content": " HTTP/1.1 500 Internal server error\n{\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"title\": \"There was a problem serving the requested information. Try again, the problem may be temporary. Please contact support if the problem persists.\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Widget_Optimizer"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/targets/blacklist/widgets/add",
    "title": "Add Blacklist Widget",
    "version": "0.1.0",
    "name": "PostTargetsWidgetsOptimizerAdd",
    "group": "Widget_Optimizer",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Add widget id to widget blacklists.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "id",
            "description": "<p>Widget id list divided by commas</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Add widget id",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": \"32,35,57\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/targets/blacklist/widgets/add'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if target was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{ \"success\": true }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Not divided by commas",
          "content": "HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"widgets\": [\n       \"21\"\n    ],\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid widget id 1000\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Widget_Optimizer"
  },
  {
    "type": "post",
    "url": "/stats/api/v1.0/boosts/:boost_id/targets/blacklist/widgets/remove",
    "title": "Remove Widget Blacklist",
    "version": "0.1.0",
    "name": "PostTargetsWidgetsOptimizerRemove",
    "group": "Widget_Optimizer",
    "permission": [
      {
        "name": "Advertiser"
      }
    ],
    "description": "<p>Remove widget ids from Widget Blacklists.</p>",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>Users unique access token. &quot;Bearer {access token}&quot;</p>"
          },
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Content-type",
            "description": "<p>Supported value &quot;application/json&quot;</p>"
          }
        ]
      }
    },
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "boost_id",
            "description": "<p>Campaign ID.</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": true,
            "field": "sub_account_id",
            "description": "<p>Sub Account ID. By default all actions are for your user account if sub account ID is not specified.</p>"
          }
        ],
        "Body": [
          {
            "group": "Body",
            "type": "String",
            "optional": false,
            "field": "id",
            "description": "<p>Widget id list divided by commas</p>"
          }
        ]
      }
    },
    "examples": [
      {
        "title": "Remove widget id",
        "content": "curl -X POST \\\n     -H \"Authorization: Bearer e62a04f681ba57d0120f8f584b688e31f04cf41d\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Cache-Control: no-cache\" \\\n     -d '{\"id\": \"32,35,57\"}' \\\n     'https://api.revcontent.io/stats/api/v1.0/boosts/308/targets/blacklist/widgets/remove'",
        "type": "json"
      }
    ],
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "boolean",
            "optional": false,
            "field": "success",
            "description": "<p>Determines if target was updated.</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Success-Response",
          "content": "{ \"success\": true }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Not divided by commas",
          "content": "HTTP/1.1 409 Conflict\n{\n    \"success\": false,\n    \"widgets\": [],\n    \"errors\": [\n        {\n            \"code\": 100,\n            \"title\": \"Invalid Argument\",\n            \"detail\": \"Invalid id value 21|1000\"\n        }\n    ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "application/controllers/stats/interfaces/boosts_interface.php",
    "groupTitle": "Widget_Optimizer"
  }
]
