# Read Split Test Results

Reads an email newsletter split test's results by variant: opens, clicks, conversions, revenue and the reported winner. While the test is running, isDecided is false and winnerLabel is null; a leading variant is not yet the winner. For the whole campaign's totals use get-campaign-statistics. Non-split-test campaigns are refused.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of the split-test newsletter, as get-newsletter reports it",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "newsletterId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "hasStarted",
    "isDecided",
    "winnerBy",
    "winnerLabel",
    "variants"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "hasStarted": {
      "type": "boolean"
    },
    "isDecided": {
      "type": "boolean"
    },
    "winnerBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "winnerLabel": {
      "type": [
        "string",
        "null"
      ]
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "label",
          "emailId",
          "name",
          "opened",
          "clicked",
          "converted",
          "revenue",
          "isWinner"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "emailId": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "opened": {
            "type": "integer"
          },
          "clicked": {
            "type": "integer"
          },
          "converted": {
            "type": "integer"
          },
          "revenue": {
            "type": "number"
          },
          "isWinner": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

