Skip to main content

OptimizationRequest

Definition of a plan optimization to run asynchronously.

workspaceIdstringrequired

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

  • Array [
  • idstringrequired

    Carrier identifier: the id of an item of type CARRIER from GET /api/v2/survey/{surveyCode}/carriers.

    minInsertionsinteger<int32>

    Minimum insertions of this carrier in the plan. Default 0.

    Default value: 0
    maxInsertionsinteger<int32>

    Maximum insertions of this carrier in the plan. It must not be lower than minInsertions. Default: no limit.

    stepinteger<int32>

    Insertions added each time the engine selects this carrier. It must be greater than 0. Default 1.

    Default value: 1
    mandatoryboolean

    When true, the carrier receives at least one insertion. Default false.

    Default value: false
    pricenumber<double>

    Net price per insertion. It replaces the price configured in the workspace for this carrier; 0 counts as no price.

  • ]
  • criterionstringrequired

    How the engine chooses the next insertion (case-insensitive). Any other value returns 400 AE_ERR_401.

    Enum ValueDescription
    COVERAGEThe insertion that adds the most coverage.
    COVERAGE_PER_CPMThe 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

  • Array [
  • typestringrequired

    Metric the objective is measured on (case-insensitive). Any other value returns 400 AE_ERR_401.

    Enum ValueDescription
    CONTACTSTotal contacts of the plan, in the same unit as stats.contacts.
    GRPGross rating points of the plan.
    COVERAGEPeople of the target reached at least once, in the same unit as stats.cover.
    COVERAGE_PERCENTCoverage as a percentage (0 to 100) of the universe of the target.
    BUDGETNet cost of the plan, in the currency of the workspace prices.

    Possible values: [CONTACTS, GRP, COVERAGE, COVERAGE_PERCENT, BUDGET]

    valuenumber<double>required

    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.

  • ]
  • minMarginalCoveragenumber<double>

    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

    Default value: 0
    target object

    Target audience the optimization aims at, by id or by inline expression (filterTgl), never both. Optional.

    idstring

    Identifier of an existing target.

    filterTglstring

    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.

    idstring

    Identifier of an existing target.

    filterTglstring

    Inline TGL expression that defines the target or the base.

    OptimizationRequest
    {
    "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"
    }
    }