readConversions

Overview

The readConversions function attempts to return conversions that match the given filter. You can return the conversions recorded for individual contacts or deliveries depending on your needs.

Results

The readConversions function may return 1 or many conversion objects. See the documentation on the conversionObject for a list of the data fields that could potentially be returned.

Note – The readConversions function is limited to returning 100 conversion objects per page. For more information on result limits and paging, see How To Read Objects.

Note – The data fields returned depend on the type of data you ask for in your request.

Syntax

conversionObject[] conversions = bApi.readConversions( filter conversionFilter,
pageNumber);

readConversions Parameters

Name Type Required Description
filter conversionFilter Yes The filter used to return specific conversions. You can specify one filter key per request. For example, you can perform a request for two contactIds, in which case, conversions for both contactIds should be returned. You can not specify both a contactId and deliveryId.
pageNumber int Yes

Retrieves the next “batch” of objects as the value specified increases from 1. In order to obtain an entire set of objects for a given call, you should increase the number value assigned to pageNumber until no more objects are returned.

Note – The readConversions function is limited to returning 100 conversion objects per page.

Examples

Code Samples

<?php
/**
  * This example will read conversion data for a specific contact
  */
 
$client = new SoapClient('https://api.bronto.com/v4?wsdl', 
              array('trace' => 1, 
                'features' => SOAP_SINGLE_ELEMENT_ARRAYS)
            );
 
try {
 
  // Add your API token 
  $token = "API TOKEN HERE";
 
  print "logging in\n";
  $sessionId = $client->login(array('apiToken' => $token))->return;
 
  $session_header = new SoapHeader("http://api.bronto.com/v4",
                   'sessionHeader',
                   array('sessionId' => $sessionId));
  $client->__setSoapHeaders(array($session_header));
 
  $filter = array(
    // Add the ID of the contact you want conversion data for
    'contactId' => 'CONTACT ID HERE'
  );
 
 
  $conversions = $client->readConversions(array(
                'filter' => $filter,
                 'pageNumber' => 1))->return;
 
 
  print_r($conversions);
 
 
} catch (Exception $e) {
  print "uncaught exception\n";
  print_r($e);
}
?>


Was this article helpful?

Not HelpfulHelpful (No Ratings Yet)
Loading...

We welcome your feedback!

Please let us know how this article could be improved.
*Name and Email are optional fields.