{
  "openapi": "3.0.4",
  "info": {
    "title": "TC.Data",
    "description": "TrueClicks data",
    "termsOfService": "https://www.trueclicks.com",
    "contact": {
      "name": "TrueClicks",
      "url": "https://www.trueclicks.com",
      "email": "support@trueclicks.com"
    },
    "license": {
      "name": "TrueClicks",
      "url": "https://www.trueclicks.com"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://tcprod-odata.azurewebsites.net"
    }
  ],
  "paths": {
    "/api/v3/audit-rule-output-table": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get rule output table with output for specific rule key",
        "operationId": "GetRuleOutputTable",
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "ruleKey",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dictionary`2ArrayStringArrayValueTuple"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/rule-output-table": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get rule output table with output for specific rule key",
        "operationId": "GetRuleOutputTableLegacy",
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "ruleKey",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dictionary`2ArrayStringArrayValueTuple"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/perfmon-alert-output-table": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get the per-campaign metric rows behind a triggered perfmon alert, identified by its perfmon id and\r\ndefinition metric id (both from the perfmon-alert-view). Each row is one campaign for one date range\r\n(DateRange 1 = current period, 2 = previous period for fluctuation metrics).",
        "operationId": "GetPerfmonOutputTable",
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "perfmonId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "perfmonDefinitionMetricId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": { }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/perfmon-output-table": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get the per-campaign metric rows behind a triggered perfmon alert, identified by its perfmon id and\r\ndefinition metric id (both from the perfmon-alert-view). Each row is one campaign for one date range\r\n(DateRange 1 = current period, 2 = previous period for fluctuation metrics).",
        "operationId": "GetPerfmonOutputTableLegacy",
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "perfmonId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "perfmonDefinitionMetricId",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": { }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/account": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get accounts",
        "operationId": "GetAccount",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAccount"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/account-label": {
      "get": {
        "tags": [
          "Api"
        ],
        "summary": "Get account labels",
        "operationId": "GetAccountLabel",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAccountLabel"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-account-result": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the latest account-aggregated check results",
        "operationId": "GetAuditResultView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-result-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the latest account-aggregated check results",
        "operationId": "GetAuditResultViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-account-result-historical": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get weekly account-aggregated check results",
        "operationId": "GetAuditResultAllView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-result-all-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get weekly account-aggregated check results",
        "operationId": "GetAuditResultAllViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-rule-result": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the latest audit and monitoring check results for one or more accounts.\r\nScoreIncrease shows how much the TrueClicks score would improve if the rule were fixed.",
        "operationId": "GetAuditRuleResultView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditRuleResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/audit-rule-result-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the latest audit and monitoring check results for one or more accounts.\r\nScoreIncrease shows how much the TrueClicks score would improve if the rule were fixed.",
        "operationId": "GetAuditRuleResultViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataAuditRuleResultView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/perfmon-alert": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the currently triggered perfmon alerts for one or more accounts. An alert is a monitored metric that\r\nbreached its threshold or fluctuation limit in the latest run of a non-paused perfmon definition.",
        "operationId": "GetPerfmonAlertView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataPerfmonAlertView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/perfmon-alert-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get the currently triggered perfmon alerts for one or more accounts. An alert is a monitored metric that\r\nbreached its threshold or fluctuation limit in the latest run of a non-paused perfmon definition.",
        "operationId": "GetPerfmonAlertViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataPerfmonAlertView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/target-pacing": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get current active target and budget pacers",
        "operationId": "GetTargetView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTargetView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/target-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get current active target and budget pacers",
        "operationId": "GetTargetViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTargetView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/target-pacing-all": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get all target and budget pacers, including already finished or future scheduled",
        "operationId": "GetTargetAllView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTargetView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/target-all-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get all target and budget pacers, including already finished or future scheduled",
        "operationId": "GetTargetAllViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTargetView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/task": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get user tasks",
        "operationId": "GetTaskView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTaskView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/task-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get user tasks",
        "operationId": "GetTaskViewLegacy",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataTaskView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/user": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get users",
        "operationId": "GetUserView",
        "parameters": [
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataUserView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/user-view": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get users",
        "operationId": "GetUserViewLegacy",
        "parameters": [
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataUserView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/user-my-accounts": {
      "get": {
        "tags": [
          "ApiView"
        ],
        "summary": "Get each user's selected \"My Accounts\", one row per user-account selection. My Accounts is the set of\r\naccounts a user has picked as their own (a per-user preference, not an access-permission list).",
        "operationId": "GetUserMyAccountView",
        "parameters": [
          {
            "name": "accountIdsFilter",
            "in": "query",
            "description": "Limit to one or more account IDs if you want to get data for specific account(s) at once. If empty accountIds list is provided then results for all accounts are returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ODataUserMyAccountView"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Dictionary`2ArrayStringArrayValueTuple": {
        "type": "object",
        "additionalProperties": false
      },
      "ODataAccount": {
        "required": [
          "account",
          "client",
          "clientCustomerId",
          "cost30",
          "cost30USD",
          "currencyCode",
          "id",
          "platform"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "account": {
            "type": "string"
          },
          "clientCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "cost30": {
            "type": "integer",
            "format": "int64"
          },
          "currencyCode": {
            "type": "string"
          },
          "cost30USD": {
            "type": "integer",
            "format": "int64"
          },
          "client": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Represents a view ODataAdWordsAccountResultView"
      },
      "ODataAccountLabel": {
        "required": [
          "accountId",
          "id",
          "key",
          "value"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "Represents OData entity for account labels"
      },
      "ODataAuditResultView": {
        "required": [
          "account",
          "accountId",
          "activity",
          "anomaly",
          "budgetDeviation",
          "change",
          "client",
          "clientCustomerId",
          "cost30",
          "cost30USD",
          "costSaving",
          "currencyCode",
          "date",
          "deeplink",
          "disapproval",
          "error",
          "essential",
          "growth",
          "hygiene",
          "onSiteScore",
          "opportunity",
          "platform",
          "ppcScore",
          "previousScore",
          "priorityCritical",
          "priorityHigh",
          "priorityLow",
          "priorityMedium",
          "score",
          "urgent",
          "week",
          "year"
        ],
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "week": {
            "type": "integer",
            "format": "int32"
          },
          "score": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "previousScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "change": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "urgent": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "error": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "disapproval": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "anomaly": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "essential": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "costSaving": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "growth": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "hygiene": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "activity": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "budgetDeviation": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ppcScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "onSiteScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "opportunity": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "priorityCritical": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "priorityHigh": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "priorityMedium": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "priorityLow": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "account": {
            "type": "string"
          },
          "clientCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "cost30": {
            "type": "integer",
            "format": "int64"
          },
          "currencyCode": {
            "type": "string"
          },
          "cost30USD": {
            "type": "integer",
            "format": "int64"
          },
          "client": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "deeplink": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ODataAuditRuleResultView": {
        "required": [
          "account",
          "accountability",
          "accountId",
          "activeWeek",
          "auditRunId",
          "category",
          "classification",
          "client",
          "clientCustomerId",
          "cost30",
          "cost30USD",
          "currencyCode",
          "dateTime",
          "deeplink",
          "doneScore",
          "effort",
          "id",
          "isCampaignSpecific",
          "isOptional",
          "outputRowsCount",
          "platform",
          "priority",
          "priorityNum",
          "ruleKey",
          "ruleKeyId",
          "ruleName",
          "score",
          "scoreIncrease",
          "status",
          "type",
          "value",
          "week",
          "year"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "auditRunId": {
            "type": "integer",
            "format": "int64"
          },
          "ruleKeyId": {
            "type": "integer",
            "format": "int32"
          },
          "ruleKey": {
            "type": "string"
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "outputRowsCount": {
            "type": "integer",
            "format": "int32"
          },
          "priorityNum": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "priority": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "week": {
            "type": "integer",
            "format": "int32"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "activeWeek": {
            "type": "string",
            "format": "date-time"
          },
          "account": {
            "type": "string"
          },
          "clientCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "cost30": {
            "type": "integer",
            "format": "int64"
          },
          "currencyCode": {
            "type": "string"
          },
          "cost30USD": {
            "type": "integer",
            "format": "int64"
          },
          "client": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "ruleName": {
            "type": "string"
          },
          "classification": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "accountability": {
            "type": "string"
          },
          "doneScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "effort": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "isOptional": {
            "type": "boolean"
          },
          "isCampaignSpecific": {
            "type": "boolean",
            "description": "True if this rule produces a campaign-level output table (can be drilled into via the campaign endpoint)."
          },
          "status": {
            "type": "string"
          },
          "scoreIncrease": {
            "type": "number",
            "description": "How much the TrueClicks score would improve if this rule were fixed (0..1 scale for auditing rules, integer impact score for failed monitoring rules).",
            "format": "double"
          },
          "score": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "deeplink": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Flattened read model combining AuditRuleResult, Account, and T4 rule metadata for API responses"
      },
      "ODataPerfmonAlertView": {
        "required": [
          "accountIds",
          "accountNames",
          "accountToday",
          "alertLevel",
          "apiType",
          "campaignIds",
          "campaignNames",
          "changeValue",
          "currentEndDate",
          "currentStartDate",
          "currentValue",
          "customerId",
          "definitionLimit",
          "definitionName",
          "id",
          "metric",
          "metricType",
          "percentageChange",
          "perfmonDefinitionMetricId",
          "perfmonId",
          "previousValue",
          "priority",
          "priorityNum",
          "timeRangeDays"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "perfmonId": {
            "type": "integer",
            "format": "int64"
          },
          "perfmonDefinitionMetricId": {
            "type": "integer",
            "description": "Identifies the definition's metric-config row; together with TC.OData.V3.Models.ODataPerfmonAlertView.PerfmonId and an account id it is\r\nthe key used to drill into the per-campaign output table.",
            "format": "int64"
          },
          "metric": {
            "type": "string"
          },
          "apiType": {
            "type": "string"
          },
          "metricType": {
            "type": "string",
            "description": "Whether the alert is a \"Threshold\" breach (current value crossed a limit) or a \"Fluctuation\" (current value\r\nmoved too far vs the previous period). Determines how TC.OData.V3.Models.ODataPerfmonAlertView.DefinitionLimit, TC.OData.V3.Models.ODataPerfmonAlertView.AlertLevel,\r\nTC.OData.V3.Models.ODataPerfmonAlertView.ChangeValue and TC.OData.V3.Models.ODataPerfmonAlertView.PercentageChange are interpreted."
          },
          "definitionName": {
            "type": "string"
          },
          "timeRangeDays": {
            "type": "integer",
            "format": "int32"
          },
          "accountIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "accountNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Account names, parallel to TC.OData.V3.Models.ODataPerfmonAlertView.AccountIds."
          },
          "campaignIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Campaign ids the alert is scoped to. Empty when the alert is account-level."
          },
          "campaignNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Campaign names, parallel to TC.OData.V3.Models.ODataPerfmonAlertView.CampaignIds. Empty when the alert is account-level."
          },
          "alertLevel": {
            "type": "string",
            "description": "The problem in words: \"Increase\"/\"Decrease\" for a Fluctuation, \"AboveThreshold\"/\"BelowThreshold\" for a Threshold."
          },
          "currentValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "previousValue": {
            "type": "number",
            "description": "The prior period's value. Relevant for Fluctuation alerts (Threshold alerts compare to TC.OData.V3.Models.ODataPerfmonAlertView.DefinitionLimit instead).",
            "format": "double",
            "nullable": true
          },
          "definitionLimit": {
            "type": "number",
            "description": "The configured limit. For a Threshold alert this is the raw threshold on the metric's own scale (e.g. 1000\r\nimpressions). For a Fluctuation alert this is the allowed fluctuation as a 0..1 fraction where 1 = 100%\r\n(e.g. 0.1 = 10%).",
            "format": "double"
          },
          "changeValue": {
            "type": "number",
            "description": "Absolute change: current − previous for a Fluctuation, current − limit for a Threshold. Null when a value is missing.",
            "format": "double",
            "nullable": true
          },
          "percentageChange": {
            "type": "number",
            "description": "Fractional change in 0..1 format where 1 = 100% (e.g. 6.95 = 695%): vs the previous value for a Fluctuation,\r\nvs the limit for a Threshold. Null when there is no comparable base value.",
            "format": "double",
            "nullable": true
          },
          "priorityNum": {
            "type": "integer",
            "description": "Numeric priority (1 = Insight … 5 = Critical); use this to sort. TC.OData.V3.Models.ODataPerfmonAlertView.Priority is the readable name.",
            "format": "int32"
          },
          "priority": {
            "type": "string",
            "description": "Readable priority name (Insight, Low, Medium, High, Critical)."
          },
          "accountToday": {
            "type": "string",
            "format": "date-time"
          },
          "currentStartDate": {
            "type": "string",
            "format": "date-time"
          },
          "currentEndDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Flattened read model for a currently triggered perfmon alert: a triggered `PerfmonInstanceResult`\r\njoined with its definition name and the metric metadata (name, platform). One row per triggered metric.\r\nThe alert is either a `Threshold` breach (current value crossed a configured limit) or a\r\n`Fluctuation` (current value moved too far vs the previous period). `PerfmonId` +\r\n`PerfmonDefinitionMetricId` + an account id are the keys used to drill into the per-campaign output table."
      },
      "ODataTargetView": {
        "required": [
          "calculatedOn",
          "currency",
          "customerId",
          "daysLeft",
          "endDate",
          "id",
          "isCurrent",
          "last7DaysValue",
          "metric",
          "name",
          "newTargetDailyValue",
          "pacingPercentage",
          "priority",
          "projectedValue",
          "startDate",
          "targetDailyValue",
          "targetId",
          "targetStatus",
          "targetValue",
          "targetValueToDate",
          "toleranceOverTargetPercentage",
          "toleranceUnderTargetPercentage",
          "type",
          "valueToDate",
          "yesterdayValue"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "targetId": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32"
          },
          "targetValue": {
            "type": "number",
            "format": "double"
          },
          "targetDailyValue": {
            "type": "number",
            "format": "double"
          },
          "targetValueToDate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "valueToDate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "pacingPercentage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "projectedValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "targetStatus": {
            "type": "string"
          },
          "last7DaysValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "yesterdayValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "newTargetDailyValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "calculatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "toleranceUnderTargetPercentage": {
            "type": "number",
            "format": "double"
          },
          "toleranceOverTargetPercentage": {
            "type": "number",
            "format": "double"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ODataTaskView": {
        "required": [
          "account",
          "accountId",
          "assignedToFirstName",
          "assignedToIsMainUser",
          "assignedToLastName",
          "assignedToLastSeenOn",
          "assignedToRegisteredOn",
          "assignedToUserEmail",
          "assignedToUserId",
          "client",
          "clientCustomerId",
          "closedOn",
          "closedOutputRowsCount",
          "closedValue",
          "cost30USD",
          "createdByFirstName",
          "createdByIsMainUser",
          "createdByLastName",
          "createdByLastSeenOn",
          "createdByRegisteredOn",
          "createdByUserEmail",
          "createdByUserId",
          "createdOn",
          "currencyCode",
          "deadlineDate",
          "description",
          "id",
          "originalOutputRowsCount",
          "originalValue",
          "platform",
          "ruleAccountability",
          "ruleCategory",
          "ruleClassification",
          "ruleClosedScore",
          "ruleDeeplink",
          "ruleDoneScore",
          "ruleEffort",
          "ruleImpactScore",
          "ruleKeyId",
          "ruleName",
          "ruleOriginalScore",
          "ruleType",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "ruleKeyId": {
            "type": "integer",
            "format": "int64"
          },
          "createdByUserId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "createdByUserEmail": {
            "type": "string"
          },
          "createdByFirstName": {
            "type": "string"
          },
          "createdByLastName": {
            "type": "string"
          },
          "createdByIsMainUser": {
            "type": "boolean",
            "nullable": true
          },
          "createdByRegisteredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdByLastSeenOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "assignedToUserId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "assignedToUserEmail": {
            "type": "string"
          },
          "assignedToFirstName": {
            "type": "string"
          },
          "assignedToLastName": {
            "type": "string"
          },
          "assignedToIsMainUser": {
            "type": "boolean",
            "nullable": true
          },
          "assignedToRegisteredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "assignedToLastSeenOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "deadlineDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "originalValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "originalOutputRowsCount": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "closedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closedValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "closedOutputRowsCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "description": {
            "type": "string"
          },
          "ruleName": {
            "type": "string"
          },
          "ruleType": {
            "type": "string"
          },
          "ruleClassification": {
            "type": "string"
          },
          "ruleAccountability": {
            "type": "string"
          },
          "ruleImpactScore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ruleEffort": {
            "type": "string"
          },
          "ruleCategory": {
            "type": "string"
          },
          "ruleDoneScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ruleOriginalScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ruleClosedScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ruleDeeplink": {
            "type": "string"
          },
          "account": {
            "type": "string"
          },
          "clientCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "currencyCode": {
            "type": "string"
          },
          "cost30USD": {
            "type": "integer",
            "format": "int64"
          },
          "client": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Represents OData entity for mapping Tasks to Accounts and T4 Rule info."
      },
      "ODataUserMyAccountView": {
        "required": [
          "account",
          "accountId",
          "client",
          "clientCustomerId",
          "cost30",
          "cost30USD",
          "currencyCode",
          "email",
          "firstName",
          "id",
          "isMainUser",
          "lastName",
          "lastSeenOn",
          "platform",
          "userId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "account": {
            "type": "string"
          },
          "clientCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "cost30": {
            "type": "integer",
            "format": "int64"
          },
          "currencyCode": {
            "type": "string"
          },
          "cost30USD": {
            "type": "integer",
            "format": "int64"
          },
          "client": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "isMainUser": {
            "type": "boolean"
          },
          "lastSeenOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents OData entity for mapping Users to their selected My Accounts"
      },
      "ODataUserView": {
        "required": [
          "accountAccessType",
          "canChangeBilling",
          "canManageAccounts",
          "canManageUsers",
          "email",
          "firstName",
          "id",
          "isMainUser",
          "lastName",
          "lastSeen",
          "lastSeenOn",
          "myAccounts",
          "name",
          "registered",
          "registeredOn",
          "sort",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "isMainUser": {
            "type": "boolean"
          },
          "registeredOn": {
            "type": "string",
            "format": "date-time"
          },
          "registered": {
            "type": "string",
            "description": "Gets or sets humanized registered date (calculated field)"
          },
          "lastSeenOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSeen": {
            "type": "string",
            "description": "Gets or sets humanized last seen date (calculated field)"
          },
          "myAccounts": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "Gets or sets Active/Inactive/Stale/Invitation status (calculated field)"
          },
          "accountAccessType": {
            "type": "string",
            "description": "Gets or sets value 'Global' or 'Personal'"
          },
          "canChangeBilling": {
            "type": "boolean"
          },
          "canManageUsers": {
            "type": "boolean"
          },
          "canManageAccounts": {
            "type": "boolean"
          },
          "sort": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Represents OData entity"
      }
    }
  }
}