Home‎ > ‎Sellers‎ > ‎APIs‎ > ‎

Reporting

Description:
Request the total number of visits sent and the associated revenue for a specific period of time.
  • The data is accurate up to the moment the API request is made.
URL:
https://api.bedrock.com/query/1.0/visit/totals

HTTP Request Methods:
GET, POST

API Rate Limit:
None.
However, BEDROCK reserves the right to limit API requests. If you are concerned about your volume please contact support.

Sample API Call:

 https://api.bedrock.com/query/1.0/visit/totals?apikey=3eb2b085c8363457dd56f42f54ee9gh6&starthour=2009-08-04-23

Request Parameters:

 Name Description Required Example Value
 apikey A 32-character secret key given to you upon registration. Yes 3eb2b085c8363457dd56f42f54ee9gh6
 starthour The report will query data back to this hour.
  • The format is YYYY-MM-DD-HH
 Yes 2009-08-04-23
 endhour The report will query data up to this hour.
  • The format is YYYY-MM-DD-HH
  • The default endhour is the current time.
 No 2009-08-05-00
 timezone A time zone can be selected to specify how the starthour and endhour should be interpreted.
 No America/Los_Angeles
 format Choose a response format. Supported formats:
  • xml (default)
  • json
 No xml
 callback Used w/ json format. Response will be JSONP w/ the passed value as a callback. No foo
 trafficid A 16-character identifier of your choice. It can be inserted into your landing page URL for tracking. No vertical

XML Response
:
A successful XML response will contain a <success> element, <starthour>, <endhour>, and <timezone> elements indicating the time period being queried, and <visits> and <amount> elements indicating the total number of visits and revenue from these visits respectively.

 <response>
  <success>true</success>
  <starthour>2009-08-04-23</starthour>
  <endhour>2009-08-05-00</endhour>
  <timezone>America/Los_Angeles</timezone>
  <visits>34959</visits>
  <revenue>1747.95</revenue>
</response> 

An unsuccessful response will contain one or more <error> elements indicating the problematic request parameter field.

 <errors>
  <error>
    <field>apikey</field>
    <message>cannot be empty</message>
  </error>
</errors>