MediaMath New Strategy Plans API

New Strategy Plans

OpenAPI Specification

mediamath-new-strategy-plans-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Campaigns Ad Servers New Strategy Plans API
  description: 'MediaMath Campaign Management API


    [Postman Collection](https://apidocs.mediamath.com/guides/postman-collections)

    '
  version: 3.0.1807
  contact:
    url: https://support.infillion.com/
servers:
- url: https://api.mediamath.com/api/v3.0
  description: Live Server
security:
- Auth0:
  - offline_access
  - manage:services
tags:
- name: New Strategy Plans
  description: New Strategy Plans
paths:
  /new_strategy_plans/forecast:
    post:
      operationId: post-ephemeral-new-strategy-plan
      summary: Post Ephemeral New Strategy Plan to Run a Forecast
      description: Post a new strategy plan object to run forecast without saving the strategy plan
      tags:
      - New Strategy Plans
      requestBody:
        $ref: '#/components/requestBodies/new_strategy_plan_create'
      responses:
        '200':
          $ref: '#/components/responses/new_strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /new_strategy_plans/{strategy_plan_id}/forecast:
    post:
      operationId: run-and-update-forecast
      summary: Run and Update Forecast for Given New Strategy Plan
      description: Run and update forecast for given new strategy plan ID
      tags:
      - New Strategy Plans
      parameters:
      - in: path
        name: strategy_plan_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy_plan object to run a forecast
      responses:
        '200':
          $ref: '#/components/responses/new_strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /new_strategy_plans/{strategy_plan_id}:
    get:
      operationId: get-new-strategy-plan
      summary: Get a New Strategy Plan
      description: Get a new strategy plan by ID
      tags:
      - New Strategy Plans
      parameters:
      - in: path
        name: strategy_plan_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy_plan object to get
      - $ref: '#/components/parameters/extended'
      responses:
        '200':
          description: New strategy plan response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/new_strategy_plan_response'
                - $ref: '#/components/schemas/new_strategy_plan_response_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-new-strategy-plan
      summary: Update a New Strategy Plan
      description: Update a new strategy plan by ID
      tags:
      - New Strategy Plans
      parameters:
      - in: path
        name: strategy_plan_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy_plan object to update
      requestBody:
        $ref: '#/components/requestBodies/new_strategy_plan_update'
      responses:
        '200':
          $ref: '#/components/responses/new_strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '409':
          $ref: '#/components/responses/error'
    delete:
      operationId: delete-new-strategy-plan
      summary: Delete a New Strategy Plan
      description: Delete a new strategy plan by ID
      tags:
      - New Strategy Plans
      parameters:
      - in: path
        name: strategy_plan_id
        schema:
          type: integer
        required: true
        description: Array numeric IDs of the strategy_plan object to delete
      responses:
        '200':
          $ref: '#/components/responses/deleted_strategy_plans'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /new_strategy_plans:
    get:
      operationId: list-new-strategy-plans
      summary: List New Strategy Plans
      description: Get a list of new strategy plans
      tags:
      - New Strategy Plans
      parameters:
      - in: query
        name: organization_id
        schema:
          type: integer
        required: false
        description: Numeric ID of the organization to get campaign plans for
      - in: query
        name: agency_id
        schema:
          type: integer
        required: false
        description: Numeric ID of the agency to get campaign plans for
      - in: query
        name: advertiser_id
        schema:
          type: integer
        required: false
        description: Numeric ID of the advertiser to get campaign plans for
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/sort_by'
      - $ref: '#/components/parameters/q'
      - $ref: '#/components/parameters/extended'
      responses:
        '200':
          description: List new strategy plans response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/new_strategy_plan_collection_full'
                - $ref: '#/components/schemas/new_strategy_plan_collection_full_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: create-new-strategy-plan
      summary: Create a New Strategy Plan
      description: Create a new strategy plan
      tags:
      - New Strategy Plans
      requestBody:
        $ref: '#/components/requestBodies/new_strategy_plan_create'
      responses:
        '201':
          $ref: '#/components/responses/new_strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /new_strategy_plan_target_values:
    get:
      operationId: list-new-strategy-plan-target-values
      summary: List New Strategy Plan Target Values
      description: Get a list of new strategy plan target values
      tags:
      - New Strategy Plans
      parameters:
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/sort_by'
      - $ref: '#/components/parameters/q'
      - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: List target values response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/strategy_plan_target_value_collection'
                - $ref: '#/components/schemas/strategy_plan_target_value_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
components:
  schemas:
    error_response:
      title: error response
      type: object
      required:
      - errors
      - meta
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              field:
                description: Optional when it is a schema error
                type: string
              message:
                type: string
        meta:
          type: object
          required:
          - status
          properties:
            status:
              type: string
    new_strategy_plan_response:
      type: object
      title: new_strategy_plan_response
      properties:
        data:
          allOf:
          - type: object
            properties:
              campaign_start_date:
                type: string
                format: date-time
                readOnly: true
              campaign_end_date:
                type: string
                format: date-time
                readOnly: true
              campaign_zone_name:
                type: string
          - $ref: '#/components/schemas/new_strategy_plan_full_response'
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    new_strategy_plan_collection_full:
      type: object
      title: new_strategy_plan_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/new_strategy_plan_full_response'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_plan_target_value_full:
      allOf:
      - type: object
        properties:
          id:
            type: integer
          strategy_target:
            $ref: '#/components/schemas/strategy_plan_target_full'
          target_value:
            type: array
            items:
              $ref: '#/components/schemas/target_value_full'
    strategy_contextual_segment_extended:
      title: ''
      type: object
      properties:
        targeting_segment_id:
          type: integer
        targeting_segment_name:
          type: string
          description: available only when extended
          readOnly: true
        full_path:
          type: string
          description: available only when extended
          readOnly: true
        vendor_id:
          type: integer
          description: available only when extended
          readOnly: true
        vendor_name:
          type: string
          description: available only when extended
          readOnly: true
        objective_type_id:
          type: integer
          description: available only when extended
          readOnly: true
        objective_type_name:
          type: string
          description: available only when extended
          readOnly: true
        retail_cpm:
          type: number
          description: available only when extended
          readOnly: true
        user_cpm:
          type: number
          readOnly: true
          description: available only when extended
        currency_code:
          type: string
          readOnly: true
          description: available only when extended
        external_code:
          type: string
          readOnly: true
          description: available only when extended
      required:
      - targeting_segment_id
    strategy_plan_details:
      type: object
      properties:
        name:
          type: string
          maxLength: 128
        feature_compatibility:
          type: string
          maxLength: 1024
        device_graph_only:
          type: boolean
    deal_group:
      title: ''
      type: object
      properties:
        deal_group_id:
          type: integer
          format: int32
          example: 9
      required:
      - deal_group_id
    strategy_plan_frequency:
      type: object
      additionalProperties: false
      properties:
        frequency_type:
          type: string
          nullable: true
          enum:
          - even
          - asap
          - no-limit
          - t1-optimized
        frequency_interval:
          type: string
          enum:
          - hour
          - day
          - week
          - month
          - campaign
          - not-applicable
        frequency_amount:
          type: integer
          format: int32
          example: 5
        frequency_optimization:
          type: boolean
    new_strategy_plan_full:
      allOf:
      - $ref: '#/components/schemas/strategy_plan_details'
      - type: object
        properties:
          zone_name:
            type: string
            example: America/New_York
          campaign_service_type:
            type: string
          type:
            type: string
          duration:
            $ref: '#/components/schemas/strategy_plan_duration'
          budget:
            $ref: '#/components/schemas/strategy_plan_budget'
          goals:
            $ref: '#/components/schemas/strategy_plan_goals'
          frequency:
            $ref: '#/components/schemas/strategy_plan_frequency'
          inventory:
            $ref: '#/components/schemas/strategy_plan_inventory'
          targeting:
            $ref: '#/components/schemas/strategy_plan_targeting'
          creatives:
            $ref: '#/components/schemas/strategy_plan_creatives'
      description: New Strategy Plan
    strategy_plan_creatives:
      type: object
      required:
      - ad_expandable
      - ad_formats
      - ad_sizes
      properties:
        ad_expandable:
          type: boolean
          nullable: true
        ad_formats:
          type: array
          items:
            type: string
          nullable: true
        ad_sizes:
          type: array
          items:
            type: string
          nullable: true
    new_strategy_plan_full_response_extended:
      allOf:
      - $ref: '#/components/schemas/new_strategy_plan_full_extended'
      - type: object
        properties:
          id:
            type: integer
            format: int32
            example: 33
          version:
            type: integer
            format: int32
            example: 3
          campaign_id:
            type: integer
            format: int32
            example: 8
    strategy_plan_targeting_extended:
      allOf:
      - properties:
          fold_position:
            type: array
            items:
              type: string
              enum:
              - ABOVE
              - BELOW
              - UNCATEGORIZED
            nullable: true
          audience:
            type: object
            properties:
              include:
                type: array
                items:
                  type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - AND
                      - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_audience_segment_extended'
              exclude:
                type: object
                properties:
                  operator:
                    type: string
                    enum:
                    - AND
                    - OR
                  segments:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_audience_segment_extended'
          contextual:
            type: object
            properties:
              include:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    operator:
                      type: string
                      enum:
                      - AND
                      - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_contextual_segment_extended'
              exclude:
                type: object
                properties:
                  code:
                    type: string
                  operator:
                    type: string
                    enum:
                    - AND
                    - OR
                  segments:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_contextual_segment_extended'
                required:
                - segments
          postal_codes:
            $ref: '#/components/schemas/targeting_postal_codes_response'
          geofence:
            type: object
            properties:
              include:
                $ref: '#/components/schemas/strategy_geofence_extended'
              exclude:
                $ref: '#/components/schemas/strategy_geofence_extended'
          my_data:
            type: object
            properties:
              include:
                $ref: '#/components/schemas/strategy_my_data_extended'
              exclude:
                $ref: '#/components/schemas/strategy_my_data_extended'
          location:
            type: object
            properties:
              include:
                type: array
                items:
                  $ref: '#/components/schemas/strategy_location_extended'
              exclude:
                type: array
                items:
                  $ref: '#/components/schemas/strategy_location_extended'
          technology:
            type: object
            properties:
              include:
                type: array
                items:
                  $ref: '#/components/schemas/strategy_technology_extended'
              exclude:
                type: array
                items:
                  $ref: '#/components/schemas/strategy_technology_extended'
          ip_addresses:
            $ref: '#/components/schemas/targeting_ip_addresses_response'
          day_parts:
            type: array
            items:
              $ref: '#/components/schemas/day_part'
          recency:
            type: array
            items:
              type: object
              properties:
                pixel_id:
                  type: integer
                  format: int32
                  example: 67
                from_hour:
                  type: integer
                  format: int32
                  example: 5
                to_hour:
                  type: integer
                  format: int32
                  example: 7
              required:
              - pixel_id
              - from_hour
              - to_hour
          language_codes:
            type: array
            items:
              properties:
                code:
                  type: string
                name:
                  type: string
      type: object
    targeting_postal_codes_response:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
        count:
          type: integer
          example: 5
    strategy_location_extended:
      title: ''
      type: object
      properties:
        target_value_id:
          type: integer
        name:
          type: string
          description: available only when extended
        full_path:
          type: string
          description: available only when extended
          example: United States >> New York >> New York
        code:
          type: string
          enum:
          - DMAX
          - REGN
          - CITY
          - COUNTRY
        provider_code:
          type: string
          description: provider/source code from the underlying target value (e.g. "US", "DMA-501"); available only when extended
        target_value:
          type: integer
          description: available only when extended
      required:
      - target_value_id
    targeting_ip_addresses:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
          enum:
          - INCLUDE
          - EXCLUDE
          - ''
        codes:
          writeOnly: true
          type: array
          maxItems: 100000
          items:
            type: string
    new_strategy_plan_response_extended:
      type: object
      title: new_strategy_plan_response_extended
      properties:
        data:
          allOf:
          - type: object
            properties:
              campaign_start_date:
                type: string
                format: date-time
                readOnly: true
              campaign_end_date:
                type: string
                format: date-time
                readOnly: true
              campaign_zone_name:
                type: string
          - $ref: '#/components/schemas/new_strategy_plan_full_response_extended'
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    targeting_ip_addresses_response:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
          enum:
          - INCLUDE
          - EXCLUDE
          - ''
        count:
          type: integer
          example: 500
    new_strategy_plan_full_extended:
      allOf:
      - $ref: '#/components/schemas/strategy_plan_details'
      - type: object
        properties:
          zone_name:
            type: string
            example: America/New_York
          campaign_service_type:
            type: string
          type:
            type: string
          duration:
            $ref: '#/components/schemas/strategy_plan_duration'
          budget:
            $ref: '#/components/schemas/strategy_plan_budget'
          goals:
            $ref: '#/components/schemas/strategy_plan_goals'
          frequency:
            $ref: '#/components/schemas/strategy_plan_frequency'
          inventory:
            $ref: '#/components/schemas/strategy_plan_inventory'
          targeting:
            $ref: '#/components/schemas/strategy_plan_targeting_extended'
          creatives:
            $ref: '#/components/schemas/strategy_plan_creatives'
      description: New Strategy Plan (extended)
    strategy_plan_goals:
      type: object
      additionalProperties: false
      properties:
        goal_type:
          type: string
          enum:
          - spend
          - reach
          - cpc
          - cpe
          - cpa
          - roi
          - ctr
          - vcr
          - viewability_rate
          - vcpm
          - cpcv
          - ''
        goal_value:
          type: number
          format: float
          minimum: 0
          maximum: 999999999.9999
        min_bid:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
        max_bid:
          type: number
          format: float
          minimum: 0.01
          maximum: 9999999.99
        roi_target:
          type: number
          format: double
          minimum: 0
          maximum: 999999999.99
          nullable: true
        bid_min_devices:
          type: integer
          nullable: true
          format: int32
          example: 1
        bid_aggressiveness:
          type: integer
          minimum: 0
          maximum: 100
        bid_price_is_media_only:
          type: boolean
        max_bid_wm:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
          nullable: true
        use_bid_shading:
          type: boolean
    list_metadata:
      title: pagination metadata
      type: object
      properties:
        status:
          type: string
          example: success
          description: The status of the response, indicating success or failure.
        count:
          type: integer
          example: 10
          description: The number of items returned in the current response.
        total_count:
          type: integer
          example: 100
          description: The total number of items available in the dataset.
        offset:
          type: integer
          example: 0
          description: The offset from the start of the dataset, used for pagination.
        next_page:
          type: string
          description: The URL to fetch the next page of results.
        prev_page:
          type: string
          description: The URL to fetch the previous page of results.
      required:
      - status
      - count
    strategy_technology:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        code:
          type: string
          enum:
          - BSER
          - CSPD
          - DVCE
          - ISPX
          - OSXX
          - INVT
          - VPSZ
          - VLIN
          - VCON
          - VAUD
          - VSKP
          - VPLC
          - DVMD
          - BRLG
          - IPTA
          - HYPL
        target_value_id:
          type: integer
          format: int32
          example: 77
      required:
      - code
      - target_value_id
    target_value_full:
      allOf:
      - type: object
        properties:
          id:
            type: integer
          parent_value_id:
            type: integer
            nullable: true
          target_dimension_id:
            type: integer
          name:
            type: string
            nullable: true
          value:
            type: integer
          code:
            type: string
            nullable: true
          is_targetable:
            type: boolean
            default: true
    supply_source:
      title: ''
      type: object
      properties:
        supply_source_id:
          type: integer
          format: int32
          example: 54
      required:
      - supply_source_id
    targeting_postal_codes:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
        codes:
          writeOnly: true
          type: array
          maxItems: 100000
          items:
            type: string
          example:
          - us-14392
          - us-24981
          - us-25632
          - us-16191
          - us-48574
          - us14392
          - us24981
          - us25632
          - us16191
          - us48574
          - '14392'
          - '24981'
          - '25632'
          - '16191'
          - '48574'
    strategy_technology_extended:
      type: object
      title: ''
      properties:
        code:
          type: string
          enum:
          - BSER
          - CSPD
          - DVCE
          - ISPX
          - OSXX
          - INVT
          - VPSZ
          - VLIN
          - VCON
          - VAUD
          - VSKP
          - VPLC
          - DVMD
          - BRLG
          - IPTA
          - HYPL
        target_value_id:
          type: integer
        name:
          type: string
          description: available only when extended
          readOnly: true
        target_value:
          type: integer
          description: available only when extended
          readOnly: true
      required:
      - code
      - target_value_id
    strategy_audience_segment:
      type: object
      title: strategy_audience_segment
      properties:
        audience_segment_id:
          type: integer
          format: int32
          example: 24
        user_cpm:
          type: number
          format: float
          nullable: true
          description: user_cpm is stored in the currency of the campaign and will not fluctuate with daily exchange rates.
      required:
      - audience_segment_id
    single_metadata:
      title: single_metadata
      type: object
      properties:
        status:
          type: string
          example: success
      required:
      - status
    deal:
      title: ''
      type: object
      properties:
        deal_id:
          type: integer
          format: int32
          example: 8
      required:
      - deal_id
    strategy_plan_budget:
      type: object
      properties:
        budget:
          type: number
          format: float
          description: Must be a valid float between 1 and 10000000 USD or its equivalent in other currency.
          nullable: true
        currency_code:
          type: string
    new_strategy_plan_full_response:
      allOf:
      - $ref: '#/components/schemas/new_strategy_plan_full'
      - type: object
        properties:
          id:
            type: integer
            format: int32
            example: 33
          version:
            type: integer
            format: int32
            example: 3
          campaign_id:
            type: integer
            format: int32
            example: 8
    strategy_geofence_extended:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        segments:
          type: array
          items:
            type: object
            required:
            - geofence_segment_id
            - geofence_segment_factual_id
            properties:
              geofence_segment_id:
                type: integer
              geofence_segment_factual_id:
                type: string
              name:
                type: string
                maxLength: 128
                description: available only when extended
              status:
                type: boolean
                description: available only when extended
              updated_on:
                type: string
                format: date-time
                readOnly: true
                description: available only when extended
    day_part:
      type: object
      required:
      - start_hour
      - end_hour
      - days
      properties:
        user_time:
          type: boolean
          default: true
        start_hour:
          type: integer
          minimum: 0
          maximum: 23
          example: 1
        end_hour:
          type: integer
          minimum: 0
          maximum: 23
          example: 5
        days:
          type: array
          items:
            type: string
            enum:
            - M
            - T
            - W
            - R
            - F
            - S
            - U
          example:
          - M
          - T
          - W
          - S
          - U
    strategy_my_data_extended:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        pixels:
          type: array
          items:
            type: object
            properties:
              pixel_id:
                type: integer
              pixel_name:
                type: string
                description: available only when extended
                readOnly: true
              pixel_type:
                type: string
                enum:
                - event
                - data
                - dynamic
                description: available only when extended
                readOnly: true
              owner_type:
                type: string
                enum:
                - advertiser
                - agency
                description: available only when extended
                readOnly: true
              owner_id:
                type: integer
                description: available only when extended
                readOnly: true
              owner_name:
                type: string
                description: available only when extended
                readOnly: true
            required:
            - pixel_id
      required:
      - pixels
    strategy_location:
      title: ''
      type: object
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        target_value_id:
          type: integer
          format: int32
          example: 87
        code:
          type: string
          enum:
          - DMAX
          - REGN
          - CITY
          - COUNTRY
      required:
      - target_value_id
      - code
    strategy_plan_duration:
      type: object
      additionalProperties: false
      properties:
        use_campaign_start:
          type: boolean
        use_campaign_end:
          type: boolean
        start_date:
          type: string
          format: date-time
          nullable: true
        end_date:
          type: string
          format: date-time
          nullable: true
    strategy_audience_segment_extended:
      type: object
      title: ''
      properties:
        audience_segment_id:
          type: integer
        audience_segment_name:
          type: string
          description: available only when extended
       

# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mediamath/refs/heads/main/openapi/mediamath-new-strategy-plans-api-openapi.yml