Cost Stats

Costs are defined per order. They can be set also for placement - they become default
costs for orders at this placement then. If cost for placement does not clearly
designate cost for orders (only totalCost is set and there is more
than one order at placement), this is treated as if the cost would not be defined.

GetPricingModelsList [finished]

Overlays:

    Activation:

    GetPricingModelsList.php ? sessionID = ...

    Description:

        Returns possible pricing models list for orders and placements.

        constants:
            - Cost per Campaign Duration
            - Cost per Day
            - Cost per Week
            - Cost per Month
            - Cost per Mille (cost per 1000 impressions)
            - Cost per Click
            - Cost per Action

    Parameters:

    • sessionID: string(16)

    Results:

    <GetPricingModelsList>
        <status>OK</status>
        <pricingModelsNumber>1</pricingModelsNumber> : uint - records number
        <pricingModels>
            <pricingModel>
                <pricingModelID>1234</pricingModelID> : uint
                <name>costTotal</name> : string(100)
            </pricingModel>
        </pricingModels>
    </GetPricingModelsList>

    Throw Errors:



    GetCostStats [finished]

    Overlays:

      Activation:

      GetCostStats.php ? sessionID = ... & dimensionIDs = ... & indicatorIDs = ... & campaignIDs = ... & timeDivision = ...    
          [ & publisherIDs = ... ]
              
          [ & placementIDs = ... ]
              
          [ & orderIDs = ... ]
              
          [ & creativeIDs = ... ]
              
          ( & timeUnits = ... |         
              [ & lowerTimeUnit = ... ]
                      
              [ & upperTimeUnit = ... ] )    
          [ & showNames = ... ]
              
          [ & humanDates = ... ]
              
          [ & indicatorNames = ... ]
              
          [ & sortDimensionIDs = ... & dimensionSortOrders = ... ]
              
          [ & sortIndicatorIDs = ... & indicatorSortOrders = ... ]
              
          [ & limit = ... ]
              
          [ & offset = ... ]

      Description:

          Returns cost statistics for given campaigns.

          Output format may vary depending on the input parameters.

          Available dimension intersections are:
              - campaign,
              - creative,
              - placement,
              - order,
              - publisher,
              - creative × placement,
              - creative × order,
              - creative × publisher.

          Available indicators are:
              - totalCost (current cost, grows up with campaign time)
              - costPerMille
              - costPerClick
              - costPerAction

          Publishers do not see statistics for placement nodes.

      Parameters:

      • sessionID: string(16)
      • dimensionIDs: uint list - list of indicator dimensions to intersect, they will appear in output
      • indicatorIDs: uint list - list of indicators (only cost indicators are allowed)
      • campaignIDs: uint list - max 40 campaigns
      • publisherIDs: uint list - filter for specific publishers
      • placementIDs: uint list - filter for specific placements
      • orderIDs: uint list - filter for specific orders
      • creativeIDs: uint list - filter for specific creatives
      • timeDivision: enum('General', 'Month', 'Week', 'Day') - name of a time period for which statistics will be displayed
      • timeUnits: timeunit list
      • lowerTimeUnit: timeunit - lower limit for statistic time units
      • upperTimeUnit: timeunit - upper limit for statistic time units
      • showNames: enum('Y','N') default 'N' - if enabled, names of objects in the result will be printed
      • humanDates: enum('Y','N') - default 'N' : @:statsHumanDatess@
      • indicatorNames: enum('Y','N') default 'Y' - if enabled, statistic value will be surrounded by XML tag containing indicator name. Otherwise, tag will be named using indicator id (e.g. <indicatorID_3>34</indicatorID_3>).
      • sortDimensionIDs: uint list - list od indicator dimensions, that will be used to sort records (eg. placement names), must be subset of dimensionIDs
      • dimensionSortOrders: enum('asc','desc') list
      • sortIndicatorIDs: uint list - list of indicators, that will be used to sort records, must be subset of indicatorIDs
      • indicatorSortOrders: enum('asc','desc') list - orders of indicator sorting, list must have the same length as sortIndicatorIDs
      • limit: uint - limits result to given number of records
      • offset: uint - skips given number of records

      Results:

      <GetCostStats>
          <status>OK</status>
          <statisticsNumber>100</statisticsNumber> : uint - all records number (if there were no limit and offset)
          <statistics>
              <statisticsRecord>
                  <campaignID>14771</campaignID> : uint
                  <placementID>4005330</placementID> : nullable uint
                  <periodName>Month</periodName> : string
                  <period>1272672000</period> : uint/timeunit - period in time unit or unix timestamp format
                  <totalCost>1013266</totalCost> : float - statistic value
                  <costPerClick>24</costPerClick> : float - statistic value
              </statisticsRecord>
          </statistics>
      </GetCostStats>

      Throw Errors:



      GetCurrenciesList [finished]

      Overlays:

        Activation:

        GetCurrenciesList.php ? sessionID = ...     
            [ & campaignID = ... ]
                
            [ & countryIDs = ... ]

        Description:

            Returns possible currency list for campaign.

        Parameters:

        • sessionID: string(16)
        • campaignID: uint
        • countryIDs: uint list

        Results:

        <GetCurrenciesList>
            <status>OK</status>
            <currencyNumber>2</currencyNumber>
            <currencies>
                <currency>
                    <currencyID>1</currencyID>
                    <code>PLN</code>
                    <name>Zloty</name>
                </currency>
                <currency>
                    <currencyID>2</currencyID>
                    <code>EUR</code>
                    <name>Euro</name>
                </currency>
            </currencies>
        </GetCurrenciesList>

        Throw Errors: