Report API

Endpoints

Base URL: https://developers.insticator.com

GET /api/v1/reports/list

Retrieve a list of reports created for an account.

Headers:

KeyTypeRequiredDescription
authorizationStringYesUnique user key

Request Body:

KeyTypeRequiredDescription
accountIdStringYesUnique publisher account ID

Response:

A list of reports, please see sample report response below.

Errors:

Status CodeMessage
404Not found!
401Authorization header missing!
401Invalid account ID!
500Internal Server Error

GET /api/v1/report/:reportUUID

Retrieve the status of a specific report.

Headers:

KeyTypeRequiredDescription
authorizationStringYesUnique user key

URL Parameters:

KeyTypeRequiredDescription
reportUUIDStringYesUnique report ID

Sample Response:

{
  "reportUUID": "41e1c183-4431-4dec-a090-54e6784ceb84",
  "accountUUID": "01905b65-fbfc-7792-9664-b37992d12747",
  "name": "Report Name",
  "dateRange": "CUSTOM",
  "from": "2024-02-13",
  "to": "2024-02-19",
  "dimensions": [
    "DATE"
  ],
  "metrics": [
    "NET_REVENUE"
  ],
  "filters": {
    "DEVICE": [
      "DESKTOP"
    ]
  },
  "schedule": {
    "frequency": "ONCE",
    "format": "CSV",
    "recipientEmails": ["[email protected]"]
  },
  "createdAt": 1719511328000,
  "reportStatus": "Ready"
}

Errors:

Status CodeMessage
500Not found!
401Authorization header missing!
401Invalid account ID!

POST /api/v1/report

Generate a new report.

Headers:

KeyTypeRequiredDescription
authorizationStringYesUnique user key

Request Body:

KeyTypeRequiredDescription
accountIdStringYesUnique publisher account ID
nameStringYesName of the report(It must always be unique)
dateRangeStringYesInterval for which the report is generated
YESTERDAY,LAST_SEVEN_DAYS,LAST_THIRTY_DAYS,LAST_WEEK,LAST_MONTH,CUSTOM
fromDateNoStart date of the interval, e.g) 2024-05-05
toDateNoEnd date of the interval, e.g) 2024-05-07
dimensionsArrayYesArray of dimensions, DATE,YEAR,WEEK,MONTH,QUARTER,PRODUCT,SITE
metricsArrayYesMetrics for the report. Possible values are,
NET_REVENUE,TOTAL_IMPRESSIONS,MONETIZABLE_PAGE_VIEW,AVG_RPM,VIEWABILITY,
BID_RATE,WIN_RATE,BID_REQUEST,BID_RESPONSE,AD_REQUEST
filtersObjectYesFilters based on GEO, and DEVICE
Possible values
Geo: ANSI country code, e.g. US, CA, UK
Device: MOBILE, DESKTOP
scheduleObjectYesScheduling details (frequency, format, recipientEmails)
Possible values
Frequency: ONCE,DAILY,WEEKLY,MONTHLY
Format: CSV, XLSX
Recipient Emails: email address in String

Errors:

Status CodeMessage
500Internal Server Error
401Authorization header missing!
401Invalid account ID!

GET /api/v1/report/:reportUUID/download

Download a generated report.

Headers:

KeyTypeRequiredDescription
authorizationStringYesUnique user key

URL Parameters:

KeyTypeRequiredDescription
reportUUIDStringYesUnique report ID

Response:

CSV, XLSX file of the report.

Errors:

Status CodeMessage
500No report record found!
500No report file found!
401Authorization header missing!
401Invalid account ID!
500Failed to generate report!

DELETE /api/v1/report/:reportUUID

Delete a specific report.

Headers:

KeyTypeRequiredDescription
authorizationStringYesUnique user key

URL Parameters:

KeyTypeRequiredDescription
reportUUIDStringYesUnique report ID

Response:

Status CodeMessage
200Report has been deleted successfully.

Errors:

Status CodeMessage
500Report not found!
401Authorization header missing!
401Invalid account ID!
500Internal Server Error