Skip to content

Read Split Test

Tool name: get-newsletter-split-test

Reads a split test whole: the share of the audience the variants are sent to, the measuring period, the winner criterion, whether it has started, and every variant with its emailId, label ("A", "B"), name, subject and editorUrl. The test is named either by "campaignId" -- the newsletterId of get-newsletter -- or by the "emailId" of one variant, which answers with that variant's test and its siblings; exactly one of the two, never both. "needsMoreVariants" is here -- a fresh test has one variant and cannot be sent until it has two -- and so is "hasStarted", which is what makes every further change refuse. Variants are changed by add-newsletter-split-test-variant, -update and -remove, the settings by configure-newsletter-split-test, the content of a variant by the email tools through its editorUrl. A campaign that is not a split test is refused, not answered with an empty test.

Input schema

campaignIdnull or integer, >= 1

ID of the split test campaign -- the newsletterId of get-newsletter; pass this or emailId, not both

Default:null
emailIdnull or integer, >= 1

Email ID of one variant, as splitTestVariants or an editor URL carries it; the answer is the whole test that variant belongs to. Either this or campaignId, never both

Default:null
accountIdnull or integer, >= 1

User ID of the account the campaign belongs to; omit for the account the access token belongs to, or pass the user ID of a subaccount the token owner may act for

Default:null
Input example
{ "campaignId": null, "emailId": null, "accountId": null }

Output schema

accountIdintegerrequired
newsletterIdintegerrequired
variantsArray of objectsrequired
variantCountintegerrequired
needsMoreVariantsbooleanrequired
sharePerVariantPercentintegerrequired
testSizePercentintegerrequired
testDurationHoursintegerrequired
winnerBystring or nullrequired
hasStartedbooleanrequired
Output example
{ "accountId": 0, "newsletterId": 0, "variants": [ { "emailId": 0, "label": "string", "name": "string", "subject": "string", "editorUrl": "string", "contentRevision": "string" } ], "variantCount": 0, "needsMoreVariants": true, "sharePerVariantPercent": 0, "testSizePercent": 0, "testDurationHours": 0, "winnerBy": "string", "hasStarted": true }