Submit a Ticket My Tickets
Welcome
Login  Sign up

REPORTS Caps Version API 3 (DEPRECATED)

REPORTS Caps API V3

Updated on 2014-04-04

Current Version: 4

Requests Allowed: GET/POST/SOAP

 

Summary:

Returns a report on click and conversion caps set on entities and the progress towards those caps within the specified time frame.

This report can also be obtained through the Affiliates or Advertisers tabs - Caps sub tab.

 

Resource/WSDL Page:

http://<your_domain_here>/api/3/reports.asmx?op=Caps

 

Parameters

api_key
Required Value
Type: STRING

Administrative API key.

Example Values: Obtained from the Setup tab - Permissions sub tab.

start_date
Required Value
Type: DATETIME

Start date for your report.

Example Values: MM/DD/YYYY

end_date
Required Value
Type: DATETIME

End date for your report.

Example Values: MM/DD/YYYY

search
Optional Value
Type: STRING
Length (Max/Min): 50

Search function that will return entities that match this value.

Example Values: CPC, Pacific Marketing, Everlasting Gobstopper

advertiser_id
Required Value
Type: INT

Filter to reduce report to only a specific advertiser.

Example Values: 0 returns all advertisers

offer_id
Required Value
Type: INT

Filter to reduce report to only a specific offer.

Example Values: 0 returns all offers

affiliate_id
Required Value
Type: INT

Filter to reduce report to only a specific affiliate.

Example Values: 0 returns all affiliates

advertiser_tag_id
Required Value
Type: INT

Filter to reduce report to only advertisers with a specific tag. Tags are found in Setup - Other Lists - Tags.

Example Values: 0 returns all advertisers

offer_tag_id
Required Value
Type: INT

Filter to reduce report to only offers with a specific tag. Tags are found in Setup - Other Lists - Tags.

Example Values: 0 returns all offers

affiliate_tag_id
Required Value
Type: INT

Filter to reduce report to only affiliates with a specific tag. Tags are found in Setup - Other Lists - Tags.

Example Values: 0 returns all affiliates

advertiser_manager_id
Required Value
Type: INT

Filter to reduce report to only advertisers with the specified advertiser manager.

Example Values: 0 returns all advertisers

affiliate_manager_id
Required Value
Type: INT

Filter to reduce report to only affiliates with the specified affiliate manager.

Example Values: 0 returns all affilaites

advertiser_billing_cycle_id
Required Value
Type: INT

Filter to reduce report to only advertisers with the specified billing cycle.

Example Values: 0 returns all advertisers

affiliate_billing_cycle_id
Required Value
Type: INT

Filter to reduce report to only affiliates with the specified billing cycle.

Example Values: 0 returns all affiliates

cap_type_id
Required Value
Type: INT

Filter to reduce report to specified cap type only.

Example Values: 0 returns all Cap types

cap_entity
Required Value
Type: STRING

Filter to reduce report to specified entities.

Example Values: all_entity_types, offer, campaign, offer_contract

cap_interval_id
Required Value
Type: INT

Filter to reduce report to specified cap interval only.

Example Values: 0 returns all cap intervals

traffic_only
Required Value
Type: BOOL

Return results for entities that have generated traffic in the specified time fame only.

Example Values: TRUE, FALSE

start_at_row
Required Value
Type: INT
Length (Max/Min): 100000

Limit results to items at and after a specific row.

Example Values: 10, 100, 1000

row_limit
Required Value
Type: INT
Length (Max/Min): 100000

Limit the number of results to specified number

Example Values: 10, 100, 1000

sort_field
Required Value
Type: STRING

Sort report by specified field.

Example Values: advertiser_id, offer_name

sort_descending
Required Value
Type: BOOL

Sort report in ascending or descending order based on sort_field selected.

Example Values: TRUE, FALSE

 **Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value). 

 

Example Request

GET

http://demo.cakemarketing.com/api/3/reports.asmx/Caps?api_key=dNJFmId9rI&start_date=01/01/2012&end_date=01/01/2013&search=Rename&advertiser_id=0&offer_id=0&affiliate_id=0&advertiser_tag_id=0&offer_tag_id=0&affiliate_tag_id=0&advertiser_manager_id=0&affiliate_manager_id=0&advertiser_billing_cycle_id=0&affiliate_billing_cycle_id=0&cap_type_id=0&cap_entity=offer_and_campaign&cap_interval_id=0&traffic_only=FALSE&start_at_row=1&row_limit=5&sort_field=percent_reached&sort_descending=FALSE

 

Sample XML Response:

<?xml version="1.0" encoding="utf-8"?>
<cap_report_response xmlns="http://cakemarketing.com/api/3/">
  <caps>
    <cap>
      <advertiser>
        <advertiser_id xmlns="API:id_name_store">int</advertiser_id>
        <advertiser_name xmlns="API:id_name_store">string</advertiser_name>
      </advertiser>
      <offer>
        <offer_id xmlns="API:id_name_store">int</offer_id>
        <offer_name xmlns="API:id_name_store">string</offer_name>
      </offer>
      <offer_contract>
        <offer_contract_id>int</offer_contract_id>
        <offer_contract_name>string</offer_contract_name>
        <price_format d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
      </offer_contract>
      <affiliate>
        <affiliate_id xmlns="API:id_name_store">int</affiliate_id>
        <affiliate_name xmlns="API:id_name_store">string</affiliate_name>
      </affiliate>
      <campaign>
        <campaign_id>int</campaign_id>
        <campaign_type d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <account_status d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <media_type d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <payment d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
      </campaign>
      <cap_entity>string</cap_entity>
      <cap_type>
        <cap_type_id xmlns="API:id_name_store">unsignedByte</cap_type_id>
        <cap_type_name xmlns="API:id_name_store">string</cap_type_name>
      </cap_type>
      <cap_interval>
        <cap_interval_id xmlns="API:id_name_store">unsignedByte</cap_interval_id>
        <cap_interval_name xmlns="API:id_name_store">string</cap_interval_name>
      </cap_interval>
      <active>boolean</active>
      <start_date>dateTime</start_date>
      <end_date>dateTime</end_date>
      <current_total>int</current_total>
      <cap_limit>int</cap_limit>
      <percent_reached>decimal</percent_reached>
    </cap>
    <cap>
      <advertiser>
        <advertiser_id xmlns="API:id_name_store">int</advertiser_id>
        <advertiser_name xmlns="API:id_name_store">string</advertiser_name>
      </advertiser>
      <offer>
        <offer_id xmlns="API:id_name_store">int</offer_id>
        <offer_name xmlns="API:id_name_store">string</offer_name>
      </offer>
      <offer_contract>
        <offer_contract_id>int</offer_contract_id>
        <offer_contract_name>string</offer_contract_name>
        <price_format d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
      </offer_contract>
      <affiliate>
        <affiliate_id xmlns="API:id_name_store">int</affiliate_id>
        <affiliate_name xmlns="API:id_name_store">string</affiliate_name>
      </affiliate>
      <campaign>
        <campaign_id>int</campaign_id>
        <campaign_type d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <account_status d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <media_type d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
        <payment d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
      </campaign>
      <cap_entity>string</cap_entity>
      <cap_type>
        <cap_type_id xmlns="API:id_name_store">unsignedByte</cap_type_id>
        <cap_type_name xmlns="API:id_name_store">string</cap_type_name>
      </cap_type>
      <cap_interval>
        <cap_interval_id xmlns="API:id_name_store">unsignedByte</cap_interval_id>
        <cap_interval_name xmlns="API:id_name_store">string</cap_interval_name>
      </cap_interval>
      <active>boolean</active>
      <start_date>dateTime</start_date>
      <end_date>dateTime</end_date>
      <current_total>int</current_total>
      <cap_limit>int</cap_limit>
      <percent_reached>decimal</percent_reached>
    </cap>
  </caps>
</cap_report_response>

 

Example Error Messages: 

Error Message

Likely Cause

Cannot convert 0 to System.Boolean.
Parameter name: type ---> String was not recognized as a valid Boolean.

Using 1 or 0 instead of TRUE or FALSE in a BOOL field.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.