# Partner Widget API Report

### Adgebra Partner Report Api Integration Guidelines

The Adgebra Partner widget Report API integration guidelines will be able to fetch numbers from Adgebra Partner widget reports in real time by sending the required parameters in an API call. In response, adgebra will send data as per the below-mentioned format

### Widget API Format <a href="#h.uu0ibjf34ptc_l" id="h.uu0ibjf34ptc_l"></a>

1. ### Request Format:

{% code overflow="wrap" %}

```html
https://adgebra.co.in/pssreport/GetPSSReportWS?p1=[PartnerID]&p2=[Date]&p3=[SiteName]&p4=[Uniwque-Pin]&p7=[Geo]&p8=[Currency]&p9=1
```

{% endcode %}

**Request Parameters :**

{% code overflow="wrap" %}

```json
p1: This parameter is the Partner ID of which the reports need to be fetched ex:p1=Partner Id of which the reports need to be fetched ex:'432'.

p2: This Parameter is the date of the report that needs to be fetched. The Date format for this field is "DD-MMM-YYYY". Ex: 01-Nov-2023

p3: This parameter represents the site name. The default is 'all'. If you need data on any particular site, you can enter the site name in the p3 parameter. Please note site names need to be entered the same as whitelisted in adgebra.

p4: This Parameter is the unique PIN associated with the partner. Here, you need to contact your partner manager to get the unique PIN. Ex: z8Sgxc82Mnxrb9me

p7: This Parameter is the Geo field. The default is 'All'. Hence, your report will be shown for all geos. Removing this parameter will run the reports by site instead of geo.

p8: This parameter is the currency format that you wish to fetch in the report. The default is 'USD'. You cannot change it to any other currency as of now.

p9: This parameter Fetches widget-wise reporting data.(default value as: 1) to fetch reports per widget.
```

{% endcode %}

**Request Example:**

{% code overflow="wrap" %}

```html
https://adgebra.co.in/pssreport/GetPSSReportWS?p1=490&p2=02-Nov-2023&p3=all&p4=z8Sgxc82Mnxrb9r3&p7=all&p8=usd&p9=1
```

{% endcode %}

2. ### Response Format:

{% code overflow="wrap" %}

```json
{
  "Site_Device": [
    {
      "Geo": "[Country]" // If p7=all, return geo-wise breakdown, else this field will not be shown.
      "Template": "[Template Name]",
      "CTR": "[Count]",
      "Revenue": "[Count]",  Only widget-specific revenue
      "Impression": "[Count]",  // Only widget-specific impressions
      "Clicks": "[Count]",  // Only unique clicks count.
      "eCPM:"[Count]", Only widget-specific ecpm
    }
  ]
}
```

{% endcode %}

**Response Example:**

{% code overflow="wrap" %}

```json
{
   "prfd-sarkaryojana.in_Mobile": [
    {
      "Geo": "India"
      "Template": "8243_880x1260_Ocean_English",
      "CTR": "0.45",
      "Revenue": "5.75",
      "Impression": "500",
      "Clicks": "225",
      "eCPM: "0.12",
    },
    {
      "Geo": "Indonesia",
      "Template": "8243_880x1260_Ocean_English",
      "CTR": "0.00",
      "Rev": "0.00",
      "Impression": "30",
      "Clicks": "0"
      "eCPM: "0.12",
    },
  ],

"pwco-outlookbusiness.com_Laptop": [
    {
      "Geo": "Bahrain",
      "Template": "8252_750x270_Infeed_English",
      "CTR": "0.00",
      "Rev": "0.00",
      "Impression": "30",
      "Clicks": "0"
      "eCPM: "0.12",
    },
]
}
```

{% endcode %}

Example Response without p7 value, if you remove the p7 value from api, below is a sample response that will be shown without geos.

{% code overflow="wrap" %}

```json
{
  "prfd-sarkaryojana.in_Mobile": [
    {
      "Template": "8243_880x1260_Ocean_English",
      "CTR": "0.45",
      "Revenue": "5.75",
      "Impression": "500",
      "Clicks": "225",
    },
    {
      "Template": "Unknown",
      "CTR": "0.00",
      "Rev": "0.00",
      "Impression": "30",
      "Clicks": "0"
      "eCPM: "0.12",
    },
  ],
"pwco-outlookbusiness.com_Laptop": [
    {
      "Template": "8252_750x270_Infeed_English",
      "CTR": "0.00",
      "Rev": "0.00",
      "Impression": "30",
      "Clicks": "0"
      "eCPM: "0.12",
    },
    {
      "Template": "Unknown",
      "CTR": "0.00",
      "Rev": "0.00",
      "Impression": "30",
      "Clicks": "0"
      "eCPM: "0.12",
    },
]
}
```

{% endcode %}

#### Note:

1. At any point in time, if the response is blank or invalid, then it should be handled at the client's end.
2. At times, when planned/unplanned adgebra maintenance activity may be scheduled.
3. If any reponse is blank, please check the values entered in the parameters. The response will also be blank in case there is no data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.adgebra.co/getting-started/publish-your-docs-6/partner-widget-api-report.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
