{"info":{"title":"Highseat Stats API","version":"1.0.0","description":"Read-only access to the same figures the dashboard shows.\n\n## Authentication\n\nSend an API key from the workspace's settings as `Authorization: Bearer hs_live_…`. A key\nreaches every site of its workspace, or only the sites it was limited to; `GET /key` says\nwhich.\n\n## Sites, dates and money\n\nA site is named by its domain (`example.com`) or its site id in the `{site}` path segment.\nDays are days in the site's own timezone. Every amount is an integer in the minor units of\nthe site's reporting currency (cents for USD), and `meta.currency` names that currency.\n\n## Responses\n\nA report answers `{ data, meta }`, and a report that lists rows `{ data, nextCursor, meta }`:\npass `nextCursor` as `cursor` to read the next page, until it comes back `null`. `limit` is\nthe page size (1–500, default 20), not a cap on the list. `meta` names the timezone, the\ncurrency, and the instants the period and the comparison resolved to. The lists of sites and\nof saved funnels read no range, so they answer `{ data, nextCursor }` without `meta`.\n\n## Errors\n\nEvery failure answers `{ error: { code, message, issues? } }`. Branch on `code`, which is\nstable; `issues` names each invalid parameter by its path.\n\n## Limits\n\nEach key makes 600 calls an hour, and a workspace runs at most five calls at once: send\nthe next call of a sync when one answers rather than all of them together. Every response\nstates the hourly budget in `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`,\nand in the structured `RateLimit-Policy` and `RateLimit` fields; a refused call adds\n`Retry-After`.\n\nThe same reference as plain Markdown is at `/api/v1/llms.txt`.","license":{"name":"Proprietary"}},"servers":[{"url":"https://app.highseat.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable and machine-readable: BAD_REQUEST, INVALID_FILTER, INVALID_CURSOR, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, QUERY_TIMEOUT, RATE_LIMITED, TOO_MANY_CONCURRENT_REQUESTS, SERVICE_UNAVAILABLE or INTERNAL_SERVER_ERROR."},"message":{"type":"string","description":"What went wrong, written for a person."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"The parameter at fault, e.g. ['filter', 1] for the second filter."},"message":{"type":"string"}},"required":["path","message"]},"description":"One entry per invalid parameter."}},"required":["code","message"]}},"required":["error"]}},"headers":{"RateLimit-Limit":{"description":"Calls the key may make in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Calls left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window reopens.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The quota and window, as the IETF draft writes it: \"hourly\";q=600;w=3600.","schema":{"type":"string"}},"RateLimit":{"description":"The remaining budget, as the IETF draft writes it: \"hourly\";r=599;t=3540.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before the next call.","schema":{"type":"integer"}}},"responses":{"Error400":{"description":"The request is malformed: BAD_REQUEST, INVALID_FILTER or INVALID_CURSOR.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"No API key, or one that is not valid: UNAUTHORIZED.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"The workspace's reports are closed until it pays: FORBIDDEN.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"The site, the funnel or the route does not exist: NOT_FOUND.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error422":{"description":"The report ran into the time cap; try a shorter range: QUERY_TIMEOUT.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"The key has used its hourly budget (RATE_LIMITED), or its workspace already has five calls running (TOO_MANY_CONCURRENT_REQUESTS).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"The server is busy; retry in a moment: SERVICE_UNAVAILABLE.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"openapi":"3.1.1","paths":{"/key":{"get":{"operationId":"key","summary":"Describe the API key","description":"The key the request was made with: its workspace, and the sites it reaches. A key limited to some sites lists them; one that reaches every site says so with `allSites`, and reaches sites added later too.","tags":["Key"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"hint":{"type":"string","description":"The key's last four characters."},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"allSites":{"type":"boolean","description":"Whether the key reaches every site of the workspace."},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in."}},"required":["id","name","domain","timezone","reportingCurrency"]},"description":"The sites the key reaches today."}},"required":["name","hint","workspace","allSites","sites"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites":{"get":{"operationId":"sites","summary":"List sites","description":"Every site the API key reaches, oldest first.","tags":["Sites"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in."}},"required":["id","name","domain","timezone","reportingCurrency"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}":{"get":{"operationId":"site","summary":"Get a site","description":"One site, by its domain or its id.","tags":["Sites"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in."}},"required":["id","name","domain","timezone","reportingCurrency"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/realtime":{"get":{"operationId":"realtime","summary":"Visitors online now","description":"Visitors active in the last five minutes.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors active in the last five minutes."}},"required":["visitors"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/overview":{"get":{"operationId":"overview","summary":"Headline figures","description":"Visitors, sessions, pageviews, bounce rate, session duration, custom events and revenue for the range, and the comparison range's beside them when one is asked for.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"events":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Custom events fired in the range, system events excluded."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale in the range, refunds netted."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"hasRevenue":{"type":"boolean","description":"Whether the site has ever recorded a sale."},"previous":{"type":"object","properties":{"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"events":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Custom events fired in the range, system events excluded."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale in the range, refunds netted."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."}},"required":["pageviews","visitors","sessions","bounceRate","avgDuration","events","revenue"],"description":"The comparison range's figures, when asked for."}},"required":["pageviews","visitors","sessions","bounceRate","avgDuration","events","revenue","currency","hasRevenue"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/timeseries":{"get":{"operationId":"timeseries","summary":"Figures per time bucket","description":"The headline figures per bucket, every bucket of the range included, empty ones as zeros. The bucket size comes back as `granularity`.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true},{"name":"event","in":"query","schema":{"type":"string","maxLength":200,"description":"Count this custom event per bucket instead of pageviews."},"allowEmptyValue":true,"allowReserved":true},{"name":"granularity","in":"query","schema":{"enum":["hour","day","week","month"],"type":"string","description":"The bucket size. Absent, it follows the range's length; one finer than the range allows is widened."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"granularity":{"enum":["minute","hour","day","week","month"],"type":"string","description":"The bucket size."},"rows":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The bucket's start, in the site's timezone."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Sales in the bucket, refunds netted."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Refunds in the bucket, already netted."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per paid order."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"previous":{"type":"object","properties":{"date":{"type":"string","description":"The bucket's start, in the site's timezone."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Sales in the bucket, refunds netted."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Refunds in the bucket, already netted."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per paid order."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."}},"required":["date","pageviews","visitors","sessions","bounceRate","avgDuration","revenue","refunded","paidOrders","averageOrder","revenuePerVisitor"],"description":"The comparison range's bucket at the same position, when asked for."}},"required":["date","pageviews","visitors","sessions","bounceRate","avgDuration","revenue","refunded","paidOrders","averageOrder","revenuePerVisitor"]}},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."}},"required":["granularity","rows"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/pages":{"get":{"operationId":"pages","summary":"Pages","description":"Pages in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"tab","in":"query","schema":{"enum":["top","entry","exit","not_found","hostnames"],"type":"string","default":"top","description":"Which page list: top (every pageview), entry or exit (the session's first or last page), not_found (404s), hostnames (the tracked host each pageview hit)."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The page path, or the hostname on the hostnames tab."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Pageviews (top, hostnames), entrances (entry), exits (exit) or hits (not_found)."},"exitRate":{"type":"number","description":"Percent, 0 to 100. Exit tab only: exits per pageview."},"avgDuration":{"type":"number","description":"Seconds. Top tab only: engaged time per view."},"linkedFrom":{"type":"string","description":"not_found tab only: the page that most often linked here, or an empty string."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted; 100 without a goal filter."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["path","visitors","count","conversionRate","revenue","orders"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/sources":{"get":{"operationId":"sources","summary":"Traffic sources","description":"Traffic sources in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"tab","in":"query","schema":{"enum":["referrers","channels"],"type":"string","default":"referrers","description":"Which grouping: referrers (the source itself) or channels (search, social, AI, …)."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The referrer source; an empty string is direct traffic."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted; 100 without a goal filter."},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"domain":{"type":"string","description":"A host for the source's favicon, or an empty string."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","conversionRate","bounceRate","avgDuration","revenue","orders","domain","pageviews"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/devices":{"get":{"operationId":"devices","summary":"Browsers, operating systems and device types","description":"The device breakdown, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["browser","os","device_type"],"type":"string","default":"browser","description":"Which device dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted; 100 without a goal filter."},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["name","visitors","conversionRate","bounceRate","avgDuration","revenue","orders"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/locations":{"get":{"operationId":"locations","summary":"Countries, regions and cities","description":"The location breakdown, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["country","region","city"],"type":"string","default":"country","description":"Which location dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A country code, an ISO 3166-2 region code, or a city name."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted; 100 without a goal filter."},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"countryCode":{"type":"string","description":"The row's ISO 3166-1 country code."}},"required":["name","visitors","conversionRate","bounceRate","avgDuration","revenue","orders","countryCode"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/campaigns":{"get":{"operationId":"campaigns","summary":"UTM campaigns","description":"The sessions tagged with one utm_* dimension, by tag, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["utm_campaign","utm_source","utm_medium","utm_content","utm_term"],"type":"string","default":"utm_campaign","description":"Which utm_* dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted; 100 without a goal filter."},"bounceRate":{"type":"number","description":"Percent, 0 to 100. Sessions that bounced, to one decimal."},"avgDuration":{"type":"number","description":"Seconds. Engaged time per session, to one decimal."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","conversionRate","bounceRate","avgDuration","revenue","orders","pageviews"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/events":{"get":{"operationId":"events","summary":"Custom events","description":"Each custom event with its count, visitors and revenue. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"share":{"type":"number","description":"Percent, 0 to 100. Visitors in the range who fired the event."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). The money the event itself carried."}},"required":["name","count","visitors","share","revenue"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/events/{name}":{"get":{"operationId":"eventDetail","summary":"One custom event","description":"Totals for one custom event, and a breakdown of its properties.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":200,"description":"The event name, exactly as the tracker sends it."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"share":{"type":"number","description":"Percent, 0 to 100. Visitors in the range who fired the event."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). The money the event itself carried."},"properties":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events carrying the key, any value."},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."}},"required":["value","count","visitors"]}}},"required":["key","count","values"]},"description":"Property keys by count, at most 50, each with its 50 most common values."}},"required":["count","visitors","share","revenue","properties"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/bots":{"get":{"operationId":"bots","summary":"Bot traffic","description":"Traffic left out of the stats, by the rule that caught it. Takes no filter: bot events carry no visitor, page or location columns.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"The rule that caught the traffic: crawler, spam, …"},"hits":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reason","hits"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/goals":{"get":{"operationId":"goals","summary":"Goal conversions","description":"Every goal saved for the site, with its conversions over the range.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors that reached the goal."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Times the goal was reached."},"rate":{"type":"number","description":"Percent, 0 to 100. Visitors in the range that converted."}},"required":["id","name","type","match","visitors","count","rate"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/revenue":{"get":{"operationId":"revenue","summary":"Revenue totals","description":"Gross and net revenue, refunds, paid orders and the average order, attributed revenue, buyers and the purchaser rate for the range. A payment provider's webhook wins over a tracker purchase carrying the same order_id.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"gross":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale, before refunds."},"net":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Gross less the refunds landed in the range."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). What the range's refunds returned."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per paid order."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."},"attributionRate":{"type":"number","description":"Percent, 0 to 100. Attributed net as a share of net."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per visitor."},"unnamedOrders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Provider orders that carried no product name."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"previous":{"type":"object","properties":{"gross":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale, before refunds."},"net":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Gross less the refunds landed in the range."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). What the range's refunds returned."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per paid order."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."},"attributionRate":{"type":"number","description":"Percent, 0 to 100. Attributed net as a share of net."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per visitor."},"unnamedOrders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Provider orders that carried no product name."}},"required":["gross","net","refunded","paidOrders","averageOrder","attributed","attributionRate","visitors","buyers","purchaserRate","revenuePerVisitor","unnamedOrders"],"description":"The comparison range's figures, when asked for."}},"required":["gross","net","refunded","paidOrders","averageOrder","attributed","attributionRate","visitors","buyers","purchaserRate","revenuePerVisitor","unnamedOrders","currency"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/revenue/products":{"get":{"operationId":"revenueByProduct","summary":"Revenue by product","description":"Products sold in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"type":{"enum":["one_time","subscription"],"type":"string"},"orders":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net of refunds."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."}},"required":["product","type","orders","revenue","attributed"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/funnels":{"get":{"operationId":"funnels","summary":"List saved funnels","description":"The funnels saved for the site, oldest first. Evaluate one by its id.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]}},"windowHours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Hours allowed between the first and the last step."},"unit":{"enum":["visitor","session"],"type":"string","description":"Whether a visitor or each session walks the funnel."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","steps","windowHours","unit","createdAt"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/funnels/{id}":{"get":{"operationId":"funnel","summary":"Evaluate a saved funnel","description":"How many visitors reached each step of the saved funnel, in order and within its window, over the range: one overall row, or one per value of `breakdown`.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The funnel's id, from the funnels list."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string","maxLength":1200},{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine filters; they all have to match."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"unit","in":"query","schema":{"enum":["visitor","session"],"type":"string","description":"Count a visitor across sessions, or each session. Absent: the funnel's own."},"allowEmptyValue":true,"allowReserved":true},{"name":"breakdown","in":"query","schema":{"enum":["referrer_source","country","device_type"],"type":"string","description":"Split every step by this dimension instead of returning one overall row."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":10,"description":"Breakdown rows to return, by first-step size. 1–50."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The breakdown value, or an empty string for the overall row."},"domain":{"type":"string","description":"A source's host for its favicon, or an empty string."},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"1-based position in the funnel."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors (or sessions) that reached the step in order."},"fromPrevious":{"type":"number","description":"Percent, 0 to 100. Of the previous step; 100 on step 1."},"fromFirst":{"type":"number","description":"Percent, 0 to 100. Of step 1."},"dropoff":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lost since the previous step; 0 on step 1."}},"required":["step","visitors","fromPrevious","fromFirst","dropoff"]}}},"required":["name","domain","steps"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}}}}