OptimizationRequest
Definition of a plan optimization to run asynchronously.
One of your workspaces (id from GET /api/v2/workspaces): the calculation context and the source of the carrier prices.
carriers object[]required
Candidate carriers, with ids from GET /api/v2/survey/{surveyCode}/carriers. At least one is required (AE_ERR_410).
Possible values: >= 1
Carrier identifier: the id of an item of type CARRIER from GET /api/v2/survey/{surveyCode}/carriers.
Minimum insertions of this carrier in the plan. Default 0.
0Maximum insertions of this carrier in the plan. It must not be lower than minInsertions. Default: no limit.
Insertions added each time the engine selects this carrier. It must be greater than 0. Default 1.
1When true, the carrier receives at least one insertion. Default false.
falseNet price per insertion. It replaces the price configured in the workspace for this carrier; 0 counts as no price.
How the engine chooses the next insertion (case-insensitive). Any other value returns 400 AE_ERR_401.
| Enum Value | Description |
|---|---|
| COVERAGE | The insertion that adds the most coverage. |
| COVERAGE_PER_CPM | The insertion that adds the most coverage per unit of cost. It needs prices. |
Possible values: [COVERAGE, COVERAGE_PER_CPM]
objectives object[]required
Stop conditions of the run. At least one is required (AE_ERR_409). The run stops at the first iteration that reaches any of them.
Possible values: >= 1
Metric the objective is measured on (case-insensitive). Any other value returns 400 AE_ERR_401.
| Enum Value | Description |
|---|---|
| CONTACTS | Total contacts of the plan, in the same unit as stats.contacts. |
| GRP | Gross rating points of the plan. |
| COVERAGE | People of the target reached at least once, in the same unit as stats.cover. |
| COVERAGE_PERCENT | Coverage as a percentage (0 to 100) of the universe of the target. |
| BUDGET | Net cost of the plan, in the currency of the workspace prices. |
Possible values: [CONTACTS, GRP, COVERAGE, COVERAGE_PERCENT, BUDGET]
Threshold to reach, in the unit of type. Use a number greater than 0: a value of 0 or less is accepted but never stops the run.
Minimum coverage gain, in percentage points of coverPercent, that an insertion must add to be chosen. From 0 to 100. When no insertion reaches it, the run stops with stopReason NO_FURTHER_IMPROVEMENT.
Possible values: >= 0 and <= 100
0target object
Target audience the optimization aims at, by id or by inline expression (filterTgl), never both. Optional.
Identifier of an existing target.
Inline TGL expression that defines the target or the base.
targetBase object
Population base (the reference universe for percentages), by id or by inline expression (filterTgl), never both. Independent of target. Optional; defaults to the whole universe.
Identifier of an existing target.
Inline TGL expression that defines the target or the base.
{
"workspaceId": "string",
"carriers": [
{
"id": "string",
"minInsertions": 0,
"maxInsertions": 0,
"step": 1,
"mandatory": false,
"price": 0
}
],
"criterion": "COVERAGE",
"objectives": [
{
"type": "CONTACTS",
"value": 0
}
],
"minMarginalCoverage": 0,
"target": {
"id": "string",
"filterTgl": "string"
},
"targetBase": {
"id": "string",
"filterTgl": "string"
}
}