{
  "info": {
    "name": "Disco Publisher Reporting API V2",
    "description": "- Endpoint: `GET /analysis/publisher-reporting/v2/report/`\n- Base URL: `https://merchant.disconetwork.com/api`\n- Auth: Publisher Reporting secret key in `X-API-Key`.\n- Manage keys in the authenticated Publisher application.\n- `ORDER_TRACKING` and `MODAL` are excluded.\n- Supply `from` and `to` together or omit both.\n- No-date non-hourly reports use the latest seven available daily dates.\n- No-date hourly reports use available hourly data capped at three inclusive dates.\n- Non-hourly ranges must fit available reporting history.\n- Hourly ranges allow up to three inclusive dates.\n- UTC rules: query dates and `period_start` are inclusive, while `period_end` is exclusive.\n- Weeks start Monday and partial week or month periods are clipped.\n- Metrics: `publisher_payout`, `widget_loads`, `widget_displays`, `viewable_widget_displays`, `impressions`, `clicks`, `conversions`, `ctr`, `cvr`.\n- Omitted metrics use all values in the listed order.\n- Formulas: `ctr = clicks / impressions` and `cvr = conversions / widget_displays`.\n- Calculated metrics use aggregated totals, four decimal places, and `0.0` for zero denominators.\n- Time grains: `total`, `day`, `week`, `month`, `hour`.\n- Group by up to three keys from `page_type`, `widget_type`, and `widget_id`.\n- Filters accept up to 250 page types or widget types without adding columns.\n- Sort defaults to `desc`, grouping values remain ascending, and sorting precedes pagination.\n- Pagination defaults to offset `0` and limit `50`, with a maximum limit of `10,000`.\n- Results are capped at 10,000 rows and summary covers all matches before pagination.\n- JSON includes `data`, `summary`, `pagination`, and `meta` without publisher identity.\n- `data_through` is the latest available data period, shown by its UTC start time. It is not a refresh time.\n- Empty matches return `200` with empty `data` and zero-valued selected summary metrics.\n- Malformed or unknown parameters, unpaired dates, empty lists, and duplicate or unsupported metrics or groupings return field-keyed `400` errors.\n- `DATE_RANGE_OUTSIDE_AVAILABLE_WINDOW` may include `available_window`.\n- Operational errors: `REPORTING_DATA_UNAVAILABLE`, `DATE_RANGE_OUTSIDE_AVAILABLE_WINDOW`, `REPORT_ROW_LIMIT_EXCEEDED`, `REPORTING_SOURCE_ROW_LIMIT_EXCEEDED`.\n- Authentication errors return `401` and non-GET methods return `405`.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://merchant.disconetwork.com/api",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string",
      "description": "Publisher Reporting secret key."
    },
    {
      "key": "date_from",
      "value": "2026-07-18",
      "type": "string"
    },
    {
      "key": "date_to",
      "value": "2026-07-20",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Report \u2014 default latest window",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/analysis/publisher-reporting/v2/report/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "analysis",
            "publisher-reporting",
            "v2",
            "report",
            ""
          ]
        },
        "description": "Returns the default total report for the latest seven available daily dates."
      },
      "response": [
        {
          "name": "200 default report",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"data\": [\n    {\n      \"period_start\": \"2026-07-14T00:00:00Z\",\n      \"period_end\": \"2026-07-21T00:00:00Z\",\n      \"publisher_payout\": 2500.0,\n      \"widget_loads\": 24000,\n      \"widget_displays\": 20000,\n      \"viewable_widget_displays\": 18400,\n      \"impressions\": 17000,\n      \"clicks\": 680,\n      \"conversions\": 200,\n      \"ctr\": 0.04,\n      \"cvr\": 0.01\n    }\n  ],\n  \"summary\": {\n    \"publisher_payout\": 2500.0,\n    \"widget_loads\": 24000,\n    \"widget_displays\": 20000,\n    \"viewable_widget_displays\": 18400,\n    \"impressions\": 17000,\n    \"clicks\": 680,\n    \"conversions\": 200,\n    \"ctr\": 0.04,\n    \"cvr\": 0.01\n  },\n  \"pagination\": {\n    \"offset\": 0,\n    \"limit\": 50,\n    \"total\": 1,\n    \"has_more\": false\n  },\n  \"meta\": {\n    \"timezone\": \"UTC\",\n    \"data_through\": \"2026-07-20T00:00:00Z\",\n    \"request_id\": \"10467741-448d-44da-b6cb-44d34d681dc3\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Report \u2014 daily by page and widget",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/analysis/publisher-reporting/v2/report/?from={{date_from}}&to={{date_to}}&metrics=publisher_payout,widget_loads,widget_displays,viewable_widget_displays,impressions,clicks,conversions,ctr,cvr&time_grain=day&group_by=page_type,widget_type&sort_order=desc&page_types=THANK_YOU,ORDER_STATUS&offset=0&limit=50",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "analysis",
            "publisher-reporting",
            "v2",
            "report",
            ""
          ],
          "query": [
            {
              "key": "from",
              "value": "{{date_from}}",
              "description": "First inclusive UTC date paired with `to`."
            },
            {
              "key": "to",
              "value": "{{date_to}}",
              "description": "Last inclusive UTC date that is not in the future."
            },
            {
              "key": "metrics",
              "value": "publisher_payout,widget_loads,widget_displays,viewable_widget_displays,impressions,clicks,conversions,ctr,cvr",
              "description": "Unique comma-separated metrics in response order."
            },
            {
              "key": "time_grain",
              "value": "day",
              "description": "UTC period grain with `total` as the default."
            },
            {
              "key": "group_by",
              "value": "page_type,widget_type",
              "description": "Accepts up to three unique grouping keys without `publisher`."
            },
            {
              "key": "sort_order",
              "value": "desc",
              "description": "Use `desc` for latest first or `asc` for oldest first."
            },
            {
              "key": "page_types",
              "value": "THANK_YOU,ORDER_STATUS",
              "description": "Filters page types. `ORDER_TRACKING` and `MODAL` are excluded."
            },
            {
              "key": "widget_types",
              "value": "SHOPIFY_NATIVE_ESSENTIAL",
              "description": "Filters widget types without adding a grouping column.",
              "disabled": true
            },
            {
              "key": "offset",
              "value": "0",
              "description": "Default 0."
            },
            {
              "key": "limit",
              "value": "50",
              "description": "Default 50, maximum 10,000."
            }
          ]
        },
        "description": "Returns daily page and widget rows. Row ratios use row totals and summary ratios use summary totals."
      },
      "response": [
        {
          "name": "200 grouped report",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"data\": [\n    {\n      \"period_start\": \"2026-07-18T00:00:00Z\",\n      \"period_end\": \"2026-07-19T00:00:00Z\",\n      \"page_type\": \"THANK_YOU\",\n      \"widget_type\": \"SHOPIFY_NATIVE_ESSENTIAL\",\n      \"publisher_payout\": 1250.0,\n      \"widget_loads\": 12000,\n      \"widget_displays\": 10000,\n      \"viewable_widget_displays\": 9200,\n      \"impressions\": 8500,\n      \"clicks\": 340,\n      \"conversions\": 100,\n      \"ctr\": 0.04,\n      \"cvr\": 0.01\n    }\n  ],\n  \"summary\": {\n    \"publisher_payout\": 1250.0,\n    \"widget_loads\": 12000,\n    \"widget_displays\": 10000,\n    \"viewable_widget_displays\": 9200,\n    \"impressions\": 8500,\n    \"clicks\": 340,\n    \"conversions\": 100,\n    \"ctr\": 0.04,\n    \"cvr\": 0.01\n  },\n  \"pagination\": {\n    \"offset\": 0,\n    \"limit\": 50,\n    \"total\": 1,\n    \"has_more\": false\n  },\n  \"meta\": {\n    \"timezone\": \"UTC\",\n    \"data_through\": \"2026-07-20T00:00:00Z\",\n    \"request_id\": \"b40ff2aa-31d5-4f4f-9b1e-798543c1f9d2\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Report \u2014 hourly with three groupings",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/analysis/publisher-reporting/v2/report/?from={{date_from}}&to={{date_to}}&metrics=widget_displays,impressions,clicks,conversions,ctr,cvr&time_grain=hour&group_by=page_type,widget_type,widget_id&sort_order=asc&offset=0&limit=10000",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "analysis",
            "publisher-reporting",
            "v2",
            "report",
            ""
          ],
          "query": [
            {
              "key": "from",
              "value": "{{date_from}}",
              "description": "First inclusive UTC date within the three-date hourly limit."
            },
            {
              "key": "to",
              "value": "{{date_to}}",
              "description": "Last inclusive UTC date within available hourly history."
            },
            {
              "key": "metrics",
              "value": "widget_displays,impressions,clicks,conversions,ctr,cvr",
              "description": "Unique comma-separated metrics in response order."
            },
            {
              "key": "time_grain",
              "value": "hour",
              "description": "Uses hourly UTC periods."
            },
            {
              "key": "group_by",
              "value": "page_type,widget_type,widget_id",
              "description": "Hourly reports support up to three groupings."
            },
            {
              "key": "sort_order",
              "value": "asc",
              "description": "Returns oldest periods first."
            },
            {
              "key": "offset",
              "value": "0",
              "description": "Skips zero sorted rows."
            },
            {
              "key": "limit",
              "value": "10000",
              "description": "Returns up to 10,000 rows."
            }
          ]
        },
        "description": "Returns hourly rows for up to three inclusive UTC dates."
      },
      "response": [
        {
          "name": "200 hourly report",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"data\": [\n    {\n      \"period_start\": \"2026-07-20T14:00:00Z\",\n      \"period_end\": \"2026-07-20T15:00:00Z\",\n      \"page_type\": \"THANK_YOU\",\n      \"widget_type\": \"SHOPIFY_NATIVE_ESSENTIAL\",\n      \"widget_id\": \"post-purchase-primary\",\n      \"widget_displays\": 600,\n      \"impressions\": 510,\n      \"clicks\": 20,\n      \"conversions\": 5,\n      \"ctr\": 0.0392,\n      \"cvr\": 0.0083\n    }\n  ],\n  \"summary\": {\n    \"widget_displays\": 600,\n    \"impressions\": 510,\n    \"clicks\": 20,\n    \"conversions\": 5,\n    \"ctr\": 0.0392,\n    \"cvr\": 0.0083\n  },\n  \"pagination\": {\n    \"offset\": 0,\n    \"limit\": 10000,\n    \"total\": 1,\n    \"has_more\": false\n  },\n  \"meta\": {\n    \"timezone\": \"UTC\",\n    \"data_through\": \"2026-07-20T14:00:00Z\",\n    \"request_id\": \"9d59b6d8-17a7-4d33-b2a4-8469f478af42\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Report \u2014 contract error examples",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/analysis/publisher-reporting/v2/report/?from={{date_from}}",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "analysis",
            "publisher-reporting",
            "v2",
            "report",
            ""
          ],
          "query": [
            {
              "key": "from",
              "value": "{{date_from}}",
              "description": "Intentionally unpaired to demonstrate date validation."
            }
          ]
        },
        "description": "Demonstrates paired-date validation with representative contract errors."
      },
      "response": [
        {
          "name": "400 paired dates",
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"date_range\":[\"`from` and `to` must be provided together.\"]}"
        },
        {
          "name": "400 REPORTING_DATA_UNAVAILABLE",
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"code\":\"REPORTING_DATA_UNAVAILABLE\",\"message\":\"Reporting data is not available yet. Please try again later.\"}"
        },
        {
          "name": "400 DATE_RANGE_OUTSIDE_AVAILABLE_WINDOW",
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"code\":\"DATE_RANGE_OUTSIDE_AVAILABLE_WINDOW\",\"message\":\"Reporting data is available from 2025-01-01 through 2026-07-20.\",\"available_window\":{\"from\":\"2025-01-01\",\"to\":\"2026-07-20\"}}"
        },
        {
          "name": "400 REPORT_ROW_LIMIT_EXCEEDED",
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"code\":\"REPORT_ROW_LIMIT_EXCEEDED\",\"message\":\"Report exceeds the interactive row limit. Narrow the date range or remove one or more breakdowns.\",\"max_rows\":10000,\"total_rows\":11042}"
        },
        {
          "name": "400 REPORTING_SOURCE_ROW_LIMIT_EXCEEDED",
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"code\":\"REPORTING_SOURCE_ROW_LIMIT_EXCEEDED\",\"message\":\"The requested historical report is too large. Choose a shorter date range or fewer breakdowns.\",\"max_source_rows\":\"100000\"}"
        },
        {
          "name": "401 invalid publisher key",
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"detail\":\"Invalid Publisher reporting API key.\"}"
        },
        {
          "name": "405 method",
          "status": "Method Not Allowed",
          "code": 405,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\"detail\":\"Method \\\"POST\\\" not allowed.\"}"
        }
      ]
    }
  ]
}
