# Reports API

```
GET https://api.offer18.com/api/m/report
```

:link: [<mark style="color:blue;">**Click to Test Reports API**</mark>](https://offer18.readme.io/reference/reports-api)

### Common Parameters

<table data-header-hidden><thead><tr><th width="150">Query</th><th width="150"> </th><th> </th></tr></thead><tbody><tr><td><strong>Query</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>mid</td><td>Integer</td><td>Network Account ID</td></tr><tr><td>api-key</td><td>String</td><td>Network API Key</td></tr><tr><td>secret-key</td><td>String</td><td>Network Secret Key</td></tr></tbody></table>

***

### Filters

<table data-header-hidden><thead><tr><th width="168.4">Query</th><th width="150"> </th><th></th></tr></thead><tbody><tr><td><strong>Query</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>date_from</td><td>Date</td><td>Report Start Date (YYYY-MM-DD)</td></tr><tr><td>date_end</td><td>Date</td><td>Report End Date (YYYY-MM-DD)</td></tr><tr><td>datetime_from</td><td>Datetime</td><td>Report Start Date &#x26; Time (YYYY-MM-DD hh:mm:ss)</td></tr><tr><td>datetime_end</td><td>Datetime</td><td>Report End Date &#x26; Time (YYYY-MM-DD hh:mm:ss)</td></tr><tr><td>results</td><td>Integer</td><td>No. of results</td></tr><tr><td>page</td><td>Integer</td><td>Page No. (Starts from zero)</td></tr><tr><td>timezone</td><td>Decimal</td><td>Default 0.0 UTC</td></tr><tr><td>offer</td><td>String</td><td>Offer ID</td></tr><tr><td>affiliate</td><td>String</td><td>Affiliate ID</td></tr><tr><td>advertiser</td><td>String</td><td>Advertiser ID</td></tr></tbody></table>

{% code overflow="wrap" %}

```
https://api.offer18.com/api/m/report?mid=000&api-key=000000&secret-key=000000000&date_from=0000-00-00&date_end=0000-00-00&offer=0000,1111,2222,3333&affiliate=0000,1111,2222&advertiser=0000,1111,2222&timezone=0.0&results=100
```

{% endcode %}

#### Get Specific fields

<table data-header-hidden><thead><tr><th width="150">Query</th><th width="158"> </th><th></th></tr></thead><tbody><tr><td><strong>Query</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>fields</td><td>String</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f517">🔗</span> <a href="../../../universal/common-values#report-fields"><mark style="color:blue;">View Fields</mark> </a></td></tr></tbody></table>

<pre data-overflow="wrap"><code><strong>https://api.offer18.com/api/m/report?mid=000&#x26;api-key=0000000&#x26;secret-key=00000000000&#x26;fields=tid,i_id,offer_name,advertiser,affiliate,advertiser_model,affiliate_model,advertiser_price,clicks,conversion,affiliate_price,date,time,hour,offer,s_affiliate,event,impressions,unique_clicks,affiliate_model,ip,currency,isp,country,conn_speed,location,browser,os,os_ver,device,device_brand,device_model,referral_domain,useragent,referral_url,aff_click_id,aff_sub1,aff_sub2,aff_sub3,aff_sub4,aff_sub5,aff_sub6,aff_sub7,aff_sub8,aff_sub9,aff_sub10,adv_sub4,adv_sub5,ios_idfa,source,google_aid,android_id,device_id,cr,ctr,epc,cpc,erpm,ecpm,e_cost_per_conversion,e_revenue_per_conversion,status,status_type,filter_log
</strong></code></pre>

#### Additional Sorting Method

<table data-header-hidden><thead><tr><th width="150">Query</th><th width="150"> </th><th width="370.2"></th></tr></thead><tbody><tr><td><strong>Query</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>sort_by</td><td>String</td><td><strong>Allowed values:</strong> clicks, unique_clicks, conversions, date, time, hour<br>(Only one option is allowed to use) </td></tr><tr><td>sort_type</td><td>String</td><td><strong>Allowed values:</strong> asc and desc</td></tr></tbody></table>

{% code overflow="wrap" %}

```
https://api.offer18.com/api/m/report?mid=000&api-key=000&secret-key=000000000000&sort_by=clicks&sort_type=asc
```

{% endcode %}

***

### Example API Request

![](https://295230641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41f2EboJipeUA6flsLGK%2Fuploads%2FUor5xxul94HkiwEeEhGS%2Fimage.png?alt=media\&token=fb06940c-b346-48d3-94b0-ad515d55c946)

***

### API Response

```
{
  "status": 200,
  "records": 100,
  "timezone": "+5:30",
  "reports": [
    {
      "TID": "D-1111-1630919271-34G126G155G34-WKBNIYP121890",
      "ImpressionID": "",
      "Date": "2021-09-06",
      "Time": "2021-09-06 14:37:51",
      "Hour": "2021-09-06 14:00",
      "OfferID": 1111,
      "OfferName": "",
      "Advertiser": 22,
      "Affiliate": 89,
      "Sub_Affiliate": "",
      "Event": "",
      "Impressions": 0,
      "Clicks": 1,
      "UniqueClicks": 0,
      "Conversions": 0,
      "Advertiser_Model": "CPA",
      "Affiliate_Model": "CPA",
      "Advertiser_Price": 0,
      "Affiliate_Price": 0,
      "IP": "1.1.1.1",
      "Currency": "USD",
      "ISP": "Mountain_View_Communications",
      "Country": "AU",
      "Connection_Speed": "cable_dsl",
      "Location": "Australia, Oceania",
      "Browser": "ch",
      "OS": "windows",
      "OSver": 10,
      "Device": "desktop",
      "Device_Brand": "Lenovo",
      "Device_Model": "ideapad-x310s-ua",
      "Referral_Domain": "urlopener.net",
      "UserAgent": "Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F93.0.4577.63+Safari%2F537.36",
      "Referral_URL": "https%3A%2F%2Fexample.net%2F",
      "Aff_Click_ID": "",
      "Aff_Sub_1": "",
      "Aff_Sub_2": "",
      "Aff_Sub_3": "",
      "Aff_Sub_4": "",
      "Aff_Sub_5": "",
      "Adv_Sub_4": "",
      "Adv_Sub_5": "",
      "iOS_IDFA": "",
      "Source": "",
      "Google_AID": "",
      "Android_ID": "",
      "Device_ID": "",
      "Status": "Approved",
      "Status_Type": "Direct",
      "Filter_Log": "",
      "CTR": "0.000 %",
      "EPC": 0,
      "CPC": 0,
      "ERPM": 0,
      "ECPM": 0,
      "E_Cost_Per_Conversion": 0,
      "E_Revenue_Per_Conversion": 0,
      "CR": "0%"
    }
  ]
}
```
