openapi: 3.0.0
info:
  title: Campaigns API
  description: MediaMath Platform API
  version: xx.xx.xx
  contact:
    email: developers@mediamath.com
    url: https://mediamathsupport.force.com/
    name: Support
paths:
  /attachments:
    get:
      summary: Get a list of attachments
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-attachments
      description: Get a list of attachments
    post:
      summary: Create an attachment
      tags:
        - Targeting
      operationId: post-attachments
      responses:
        '201':
          $ref: '#/components/responses/attachment'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      description: Create an attachment
      requestBody:
        $ref: '#/components/requestBodies/attachment_create'
  /attachment:
    get:
      summary: Get a list of attachments
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-attachments-legacy
      description: Get a list of attachments
    post:
      summary: Create an attachment
      operationId: post-attachments-legacy
      tags:
        - Targeting
      responses:
        '201':
          $ref: '#/components/responses/attachment'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      description: Create an attachment
      requestBody:
        $ref: '#/components/requestBodies/attachment_create'
  /attachments/{attachment_id}:
    get:
      summary: Get a specific attachment
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/attachment'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-attachments-attachment_id
      description: Get an attachment by ID
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to get
    post:
      summary: Update an attachment
      operationId: post-attachments-attachment_id
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/attachment'
        '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'
      description: Update an attachment by id
      requestBody:
        $ref: '#/components/requestBodies/attachment_update'
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to update
    delete:
      summary: Delete an attachment
      operationId: delete-attachments-attachment_id
      tags:
        - Targeting
      responses:
        '200':
          description: Empty response
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Delete an attachment by id
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to delete
  /attachment/{attachment_id}:
    get:
      summary: Get a specific attachment
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/attachment'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-attachments-attachment_id-legacy
      description: Get an attachment by ID
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to get
    put:
      summary: Update an attachment
      operationId: put-attachment-attachment_id
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/attachment'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Update an attachment by id
      requestBody:
        $ref: '#/components/requestBodies/attachment_update'
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to update
    delete:
      summary: Delete an attachment
      operationId: delete-attachment-attachment_id
      tags:
        - Targeting
      responses:
        '200':
          description: Empty response
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Delete an attachment by id
      parameters:
        - schema:
            type: integer
          name: attachment_id
          in: path
          required: true
          description: Numeric ID of the attachment to delete
  /target:
    get:
      operationId: list-targets-legacy
      summary: (Legacy) List targets
      description: Get a list of targets
      tags:
        - Targeting
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      summary: (Legacy) Create a target
      operationId: post-target-legacy
      tags:
        - Targeting
      responses:
        '201':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      description: Create a target
      requestBody:
        $ref: '#/components/requestBodies/target_create'
  /target/{target_id}:
    get:
      summary: (Legacy) Get a specific target
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-targets-target_id-legacy
      description: Get a target by id
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to get
    post:
      summary: (Legacy) Update a target
      operationId: post-targets-target_id-legacy
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Update a target by id
      requestBody:
        $ref: '#/components/requestBodies/target_update'
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to update
    delete:
      summary: (Legacy) Delete a specific target
      operationId: delete-targets-target_id-legacy
      description: Delete a target by id
      tags:
        - Targeting
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to delete
    put:
      summary: (Legacy) Update a target
      operationId: put-target-target_id-legacy
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Update a target by id
      requestBody:
        $ref: '#/components/requestBodies/target_update'
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to update
  /targets:
    get:
      operationId: list-targets
      summary: List targets
      description: Get a list of targets
      tags:
        - Targeting
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      summary: Create a target
      operationId: post-target
      tags:
        - Targeting
      responses:
        '201':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Create a target
      requestBody:
        $ref: '#/components/requestBodies/target_create'
  /targets/{target_id}:
    get:
      summary: Get a specific target
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-targets-target_id
      description: Get a target by id
      parameters:
        - in: path
          name: target_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the target to get
    post:
      summary: Update a target
      operationId: post-targets-target_id
      tags:
        - Targeting
      responses:
        '200':
          $ref: '#/components/responses/target'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      description: Update a target by id
      requestBody:
        $ref: '#/components/requestBodies/target_update'
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to update
    delete:
      summary: Delete a specific target
      operationId: delete-targets-target_id
      description: Delete a target by id
      tags:
        - Targeting
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      parameters:
        - schema:
            type: integer
          name: target_id
          in: path
          required: true
          description: Numeric ID of the target to delete
  /target-path:
    get:
      operationId: list-target-legacy
      summary: List target paths
      description: Get a list of target paths
      tags:
        - Targeting
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /advertisers:
    get:
      operationId: list-advertisers
      summary: List advertisers
      description: Get a list of advertisers
      tags:
        - Advertisers
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/advertisers_with'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: list of advertisers
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/advertiser_collection'
                  - $ref: '#/components/schemas/advertiser_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: create-advertiser
      summary: Create an Advertiser
      description: Create an advertiser
      tags:
        - Advertisers
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/advertiser_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/advertiser_create'
  /advertisers/{advertiser_id}:
    get:
      operationId: get-advertiser
      tags:
        - Advertisers
      summary: Get an Advertiser
      description: Get an Advertiser by its ID
      parameters:
        - in: path
          name: advertiser_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the advertiser to get
      responses:
        '200':
          description: Advertiser GET
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/advertiser_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-advertiser
      description: Update an advertiser by id
      parameters:
        - in: path
          name: advertiser_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the advertiser to update
      summary: Update an Advertiser
      tags:
        - Advertisers
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/advertiser_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/advertiser_update'
  /advertisers/{advertiser_id}/history:
    get:
      operationId: advertiser-audit-log
      summary: Advertiser Audit Log
      description: Get a list changes to this advertiser
      tags:
        - Advertisers
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: advertiser_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the advertiser
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /agencies:
    get:
      operationId: list-agencies
      summary: List Agencies
      description: Get a list of agencies
      tags:
        - Agencies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/agencies_with'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: list of agencies
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/agency_collection'
                  - $ref: '#/components/schemas/agency_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: create-agency
      summary: Create an Agency
      description: Create an agency
      tags:
        - Agencies
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agency_create_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/agency_create'
  /agencies/{agency_id}:
    get:
      operationId: get-agency
      tags:
        - Agencies
      summary: Get an Agency
      description: Get an Agency by its ID
      parameters:
        - in: path
          name: agency_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the agency to get
      responses:
        '200':
          description: Agency GET
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agency_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-agency
      parameters:
        - in: path
          name: agency_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the agency to update
      summary: Update an Agency
      description: Update an existing agency
      tags:
        - Agencies
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agency_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/agency_base'
  /agencies/{agency_id}/history:
    get:
      operationId: agency-audit-log
      summary: Agency Audit Log
      description: Get a list of changes to this agency
      tags:
        - Agencies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: agency_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the agency
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /creatives/{creative_id}:
    get:
      operationId: get-creative
      tags:
        - Creatives
      summary: Get a Creative
      description: Get an Creative by its ID
      parameters:
        - in: path
          name: creative_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the creative to get
      responses:
        '200':
          description: Creative GET
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/creative_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /pixel_bundles:
    post:
      operationId: create-pixel-bundle
      summary: Create A Pixel Bundle
      description: Create a new Pixel Bundle
      tags:
        - Pixel Bundles
      requestBody:
        $ref: '#/components/requestBodies/pixel_bundle_create'
      responses:
        '201':
          description: Pixel Bundle has been created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/pixel_bundle_base'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    get:
      operationId: list-pixel-bundles
      summary: List Pixel Bundles
      description: Get a list of Pixel Bundles
      tags:
        - Pixel Bundles
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/agencies_with'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: list of Pixel Bundles
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/pixel_bundle_collection'
                  - $ref: '#/components/schemas/pixel_bundle_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /pixel_bundles/{pixel_bundle_id}:
    post:
      operationId: update-pixel-bundle
      summary: Update A Pixel Bundle
      description: Update a Pixel Bundle by its ID
      tags:
        - Pixel Bundles
      parameters:
        - in: path
          name: pixel_bundle_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the pixel bundle to update
      requestBody:
        $ref: '#/components/requestBodies/pixel_bundle_update'
      responses:
        '200':
          description: Pixel Bundle has been updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/pixel_bundle_base'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    get:
      operationId: get-pixel-bundle
      tags:
        - Pixel Bundles
      summary: Get a Pixel Bundle
      description: Get a Pixel Bundle by its ID
      parameters:
        - in: path
          name: pixel_bundle_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the pixel bundle to get
      responses:
        '200':
          description: Pixel Bundle GET
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/pixel_bundle_base'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /pixel_bundles/{pixel_bundle_id}/history:
    get:
      operationId: pixel-bundle-audit-log
      summary: Pixel Bundle Audit Log
      description: Get a list changes to this pixel bundle
      tags:
        - Pixel Bundles
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: pixel_bundle_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the pixel bundle
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /healthcheck:
    get:
      tags:
        - General
      summary: Health Check
      description: Health endpoint for availability check.
      responses:
        '200':
          $ref: '#/components/responses/health_check'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '503':
          $ref: '#/components/responses/error'
      operationId: healthcheck
  /organizations:
    get:
      operationId: list-organizations
      summary: List Organizations
      description: Get a list of organizations
      tags:
        - Organizations
      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 of organizations
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/organization_collection'
                  - $ref: '#/components/schemas/organization_response'
              examples:
                example:
                  summary: Example response with three organizations
                  value:
                    data:
                      - id: 100000
                        name: Organization One
                        entity_type: organization
                      - id: 100001
                        name: Organization Two
                        entity_type: organization
                      - id: 100002
                        name: Organization Three
                        entity_type: organization
                    meta:
                      count: 3
                      total_count: 100
                      offset: 0
                      status: success
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: create-organization
      summary: Create an Organization
      description: Create an organization
      tags:
        - Organizations
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/organization_base'
  /organizations/{organization_id}:
    get:
      operationId: get-organization
      parameters:
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization
      summary: Get an Organization
      description: Get an existing organization
      tags:
        - Organizations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-organization
      parameters:
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization to update
      summary: Update an Organization
      description: Update an existing organization
      tags:
        - Organizations
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '409':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/organization_update'
  /organizations/{organization_id}/history:
    get:
      operationId: organization-audit-log
      summary: Organization Audit Log
      description: Get a list of changes to this organization
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /audit_log/organizations:
    post:
      operationId: organization-audit-log-bulk
      summary: Bulk Organization Audit Log
      description: Get a list of changes to these organizations
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
  /organizations/{organization_id}/permissions:
    get:
      operationId: list-permissions-organization
      summary: List User Permissions for an Organization
      description: List User Permissions for an Organization
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_organization'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /organizations/{organization_id}/settings:
    get:
      operationId: list-settings-organization
      summary: List Settings for an Organization
      description: List Settings for an Organization
      tags:
        - List Organization Settings
      parameters:
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/settings_organization'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-settings-organization
      summary: Update Settings for an Organization
      description: Update Settings for an Organization
      tags:
        - Update Organization Settings
      parameters:
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the organization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/settings_organization'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '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'
      requestBody:
        $ref: '#/components/requestBodies/organization_update'
  /campaign_plans:
    get:
      operationId: get-campaign-plan
      summary: List Campaign Plans
      description: List Campaign Plans
      tags:
        - Campaign Plans
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/campaign_plan'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      summary: Create Campaign Plan
      tags:
        - Campaign Plans
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  advertiser_id:
                    type: integer
                  duration:
                    type: object
                    properties:
                      start_date:
                        type: string
                      end_date:
                        type: string
                  budget:
                    type: object
                    properties:
                      total_budget:
                        type: number
                        format: float
                        minimum: 1
                        maximum: 99999999999999.98
                      currency_code:
                        type: string
                  zone_name:
                    type: string
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 256
                advertiser_id:
                  type: integer
                  format: int32
                duration:
                  type: object
                  properties:
                    start_date:
                      type: string
                      format: date-time
                    end_date:
                      type: string
                      format: date-time
                  required:
                    - start_date
                    - end_date
                budget:
                  type: object
                  properties:
                    total_budget:
                      type: number
                      format: float
                      minimum: 1
                      maximum: 99999999999999.98
                    currency_code:
                      type: string
                      maxLength: 3
                  required:
                    - total_budget
                    - currency_code
                zone_name:
                  type: string
              required:
                - name
                - advertiser_id
                - duration
                - budget
                - zone_name
            examples:
              Example:
                value:
                  advertiser_id: 190
                  name: valid campaign plan
                  duration:
                    start_date: '2050-01-01T10:00:00Z'
                    end_date: '2050-01-10T23:59:00Z'
                  budget:
                    currency_code: USD
                    total_budget: 100
                  zone_name: America/New_York
        description: ''
      description: Create a campaign plan
      operationId: create-campaign-plan
  /campaign_plans/{campaign_plan_id}:
    get:
      operationId: get-campaign-plan-by-id
      summary: Get a Campaign Plan
      description: Get a Campaign Plan
      parameters:
        - in: path
          name: campaign_plan_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the campaign plan
      tags:
        - Campaign Plans
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/campaign_plan'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      summary: Update Campaign Plan
      parameters:
        - in: path
          name: campaign_plan_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the campaign plan object to update
      tags:
        - Campaign Plans
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  advertiser_id:
                    type: integer
                  duration:
                    type: object
                    properties:
                      start_date:
                        type: string
                      end_date:
                        type: string
                  budget:
                    type: object
                    properties:
                      total_budget:
                        type: number
                        format: float
                        minimum: 1
                        maximum: 99999999999999.98
                      currency_code:
                        type: string
                  zone_name:
                    type: string
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 256
                duration:
                  type: object
                  properties:
                    start_date:
                      type: string
                      format: date-time
                      description: start_date can not be in the past
                    end_date:
                      type: string
                      format: date-time
                      description: >-
                        end_date must be between 1 and 30 days away from
                        start_date
                  required:
                    - start_date
                    - end_date
                budget:
                  type: object
                  properties:
                    total_budget:
                      type: number
                      format: float
                      minimum: 1
                      maximum: 99999999999999.98
                    currency_code:
                      type: string
                      maxLength: 3
                  required:
                    - total_budget
                    - currency_code
                zone_name:
                  type: string
              required:
                - name
                - duration
                - budget
                - zone_name
            examples:
              Example:
                value:
                  name: valid campaign plan
                  duration:
                    start_date: '2050-01-01T10:00:00Z'
                    end_date: '2050-01-10T23:59:00Z'
                  budget:
                    currency_code: USD
                    total_budget: 100
                  zone_name: America/New_York
        description: ''
      description: Update a campaign plan
      operationId: update-campaign-plan
  /strategy_plans:
    get:
      tags:
        - Strategy Plans
      summary: List Strategy Plans
      description: Get a list of 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/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          description: strategy plan list that matches the parameter criteria
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_plan_response'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: list-strategy-plans
    post:
      tags:
        - Strategy Plans
      summary: Create a strategy plan
      description: Create a strategy plan
      requestBody:
        $ref: '#/components/requestBodies/strategy_plan'
      responses:
        '201':
          $ref: '#/components/responses/strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: create-strategy-plan
  /strategy_plans/{strategy_plan_id}:
    get:
      tags:
        - Strategy Plans
      summary: Get Strategy Plan
      description: Get a strategy plan
      parameters:
        - in: path
          name: strategy_plan_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy_plan object to get
      responses:
        '200':
          $ref: '#/components/responses/strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-plan
    post:
      tags:
        - Strategy Plans
      summary: Update a strategy plan
      description: Update a strategy plan
      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/strategy_plan'
      responses:
        '200':
          $ref: '#/components/responses/strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: update-strategy-plan
    delete:
      tags:
        - Strategy Plans
      summary: Delete strategy plans
      description: Delete a strategy plan
      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'
      operationId: delete-strategy-plan
  /strategy_plans/forecast:
    post:
      tags:
        - Strategy Plans
      summary: Post ephemeral strategy plan to run a forecast
      description: >-
        Post a strategy plan object to run forcast without saving the strategy
        plan
      requestBody:
        $ref: '#/components/requestBodies/strategy_plan'
      responses:
        '200':
          $ref: '#/components/responses/strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: post-ephemeral-strategy-plan
  /new_strategy_plans/forecast:
    post:
      tags:
        - New Strategy Plans
      summary: Post ephemeral new strategy plan to run a forecast
      description: >-
        Post a strategy plan object to run forcast without saving the strategy
        plan
      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'
      operationId: post-ephemeral-new-strategy-plan
  /strategy_plans/{strategy_plan_id}/forecast:
    post:
      tags:
        - Strategy Plans
      summary: Run and update forecast for given strategy_plan_id
      description: Run and update forecast for given strategy_plan_id
      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/strategy_plan'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: run-and-update-forecast
  /new_strategy_plans/{strategy_plan_id}/forecast:
    post:
      tags:
        - New Strategy Plans
      summary: Run and update forecast for given strategy_plan_id
      description: Run and update forecast for given strategy_plan_id
      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'
      operationId: new-run-and-update-forecast
  /new_strategy_plans/{strategy_plan_id}:
    get:
      tags:
        - New Strategy Plans
      summary: Get Strategy Plan
      description: Get a strategy plan
      parameters:
        - in: path
          name: strategy_plan_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy_plan object to get
      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'
      operationId: get-new-strategy-plan
    post:
      tags:
        - New Strategy Plans
      summary: Update a strategy plan
      description: Update a strategy plan
      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'
      operationId: update-new-strategy-plan
    delete:
      tags:
        - New Strategy Plans
      summary: Delete a strategy plan
      description: Delete a strategy plan
      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'
      operationId: delete-new-strategy-plan
  /new_strategy_plans:
    get:
      tags:
        - New Strategy Plans
      summary: List New Strategy Plans
      description: Get a list of 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/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          description: strategy plan list that matches the parameter criteria
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/new_strategy_plan_full'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: list-new-strategy-plans
    post:
      tags:
        - New Strategy Plans
      summary: Create New Strategy Plan
      description: Create a new strategy plan
      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'
      operationId: create-new-strategy-plan
  /new_strategy_plan_target_values:
    get:
      summary: List New Strategy Plan Target Values
      description: Get a list of New Strategy Plan Target Values
      tags:
        - Strategy Plan Target Values
      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: OK
          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'
      operationId: get-new-strategy-plan-target-values
  /audience_segments/estimate:
    post:
      tags:
        - Targeting
      summary: Audience Segment Estimates CPM and Size
      description: Audience Segment Estimates CPM and Size
      requestBody:
        $ref: '#/components/requestBodies/audience_segments_estimate_cpm_and_size'
      responses:
        '200':
          $ref: '#/components/responses/audience_segments_estimate_cpm_and_size'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: audience-segment-estimates
  /advertisers/{advertiser_id}/pixel_targeting_advertisers:
    get:
      operationId: get-advertisers-advertiser_id-pixel_x_advertisers
      summary: List Advertisers when Agency has Cross Advertiser Pixels enabled
      tags:
        - Advertisers
      description: >-
        List all advertiser siblings when parent agency has allow_x_adv_pixels
        set to true
      parameters:
        - schema:
            type: string
          name: advertiser_id
          in: path
          required: true
          description: Numeric ID of the advertiser to get
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/advertiser_collection'
                  - $ref: '#/components/schemas/advertiser_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /strategies:
    post:
      tags:
        - Strategies
      summary: Create A Strategy
      description: Create a new Strategy
      parameters:
        - $ref: '#/components/parameters/extended'
      requestBody:
        $ref: '#/components/requestBodies/strategy_create'
      responses:
        '201':
          description: Strategy has been created successfully
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy'
                  - $ref: '#/components/schemas/strategy_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: create-strategy
    get:
      tags:
        - Strategies
      summary: List Strategies
      description: Get a list of strategies
      parameters:
        - $ref: '#/components/parameters/strategy_with'
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/extended'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: strategy list that matches the parameter criteria
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_collection'
                  - $ref: '#/components/schemas/strategy_collection_full'
                  - $ref: '#/components/schemas/strategy_collection_full_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: list-strategies
  /strategies/{strategy_id}:
    post:
      operationId: post-strategies-strategy_id
      tags:
        - Strategies
      summary: Update A Strategy
      description: Update an existing Strategy
      parameters:
        - in: path
          name: strategy_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy to update
        - $ref: '#/components/parameters/extended'
      requestBody:
        $ref: '#/components/requestBodies/strategy_update'
      responses:
        '200':
          description: Example Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy'
                  - $ref: '#/components/schemas/strategy_extended'
        '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'
    get:
      tags:
        - Strategies
      summary: Get A Strategy
      description: Get a strategy by id
      parameters:
        - in: path
          name: strategy_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy object to get
        - $ref: '#/components/parameters/extended'
      responses:
        '200':
          description: Example Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy'
                  - $ref: '#/components/schemas/strategy_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy
  /strategies/{strategy_id}/friendly_names:
    description: Get Targeting Friendly Names
    get:
      tags:
        - Strategies
      summary: Get Targeting Friendly Names
      description: Get Targeting Friendly Names
      parameters:
        - in: path
          name: strategy_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy object
      responses:
        '200':
          $ref: '#/components/responses/strategy_friendly_names'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-friendly-names
  /strategies/{strategy_id}/history:
    get:
      operationId: strategy-audit-log
      summary: Strategy Audit Log
      description: Get a list changes to this strategy
      tags:
        - Strategies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: strategy_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /bulk_update/strategies:
    post:
      tags:
        - Bulk Update
      summary: Update multiple strategies.
      description: update multiple strategies.
      responses:
        '200':
          $ref: '#/components/responses/strategy_bulk'
        '207':
          description: multi status updated strategy list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_full'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: bulk-update-strategies
      requestBody:
        $ref: '#/components/requestBodies/strategy_bulk_update'
  /bulk_update/budget_flights:
    post:
      tags:
        - Bulk Update
      summary: Update multiple budget flights.
      description: Update multiple budget flights.
      requestBody:
        $ref: '#/components/requestBodies/budget_flight_bulk_update'
      responses:
        '200':
          description: updated budget flight list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      items:
                        $ref: '#/components/schemas/campaign_budget_flights'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '207':
          description: multi status updated budget flight list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/campaign_budget_flights'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: bulk-update-budget-flights
  /targeting:
    post:
      summary: Add and view Targeting
      tags:
        - Targeting
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      location:
                        type: array
                        nullable: true
                        items:
                          $ref: '#/components/schemas/location_response'
                  meta:
                    type: object
                    required:
                      - status
                      - count
                    properties:
                      status:
                        type: string
                        minLength: 1
                      count:
                        type: number
                  errors:
                    type: array
                    nullable: true
                    items: {}
                required:
                  - meta
        '207':
          description: Multi-Status (WebDAV)
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - location
                    properties:
                      location:
                        type: array
                        uniqueItems: true
                        minItems: 1
                        items:
                          type: object
                          properties:
                            strategy_id:
                              type: number
                            strategy_target_id:
                              type: number
                            strategy_target_exclude:
                              type: boolean
                            strategy_target_active:
                              type: boolean
                            strategy_target_operator:
                              type: string
                              minLength: 1
                            strategy_target_value_id:
                              type: number
                            target_dimension_code:
                              type: string
                              minLength: 1
                            target_dimension_name:
                              type: string
                              minLength: 1
                            target_value_id:
                              type: number
                            target_value_name:
                              type: string
                              minLength: 1
                            target_value_value:
                              type: number
                            target_value_code:
                              type: string
                              minLength: 1
                            strategy_count:
                              type: number
                          required:
                            - strategy_id
                            - strategy_target_id
                            - strategy_target_exclude
                            - strategy_target_active
                            - strategy_target_operator
                            - strategy_target_value_id
                            - target_dimension_code
                            - target_dimension_name
                            - target_value_id
                            - target_value_name
                            - target_value_value
                            - target_value_code
                            - strategy_count
                  meta:
                    type: object
                    required:
                      - status
                      - count
                    properties:
                      status:
                        type: string
                        minLength: 1
                      count:
                        type: number
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          minLength: 1
                        message:
                          type: string
                          minLength: 1
                        field:
                          type: string
                          minLength: 1
                      required:
                        - code
                        - message
                        - field
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: add-view-targeting
      requestBody:
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                strategy_id:
                  type: array
                  items:
                    type: integer
                targeting:
                  $ref: '#/components/schemas/targeting_base'
              required:
                - strategy_id
      description: add and view targeting
  /bulk_update/campaigns:
    post:
      summary: Update multiple campaigns
      operationId: bulk-update-campaigns
      responses:
        '200':
          $ref: '#/components/responses/campaign_bulk'
        '207':
          $ref: '#/components/responses/campaign_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      description: update multiple campaigns
      requestBody:
        $ref: '#/components/requestBodies/campaign_bulk_update'
      tags:
        - Bulk Update
  /campaigns/{campaign_id}:
    get:
      summary: Get A Specific Campaign
      tags:
        - Campaigns
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/campaign_full'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-campaign-by-id
      description: Get a campaign by id
      parameters:
        - schema:
            type: integer
          name: campaign_id
          in: path
          required: true
          description: Numeric ID of the campaign to get
    post:
      summary: Update A Campaign
      tags:
        - Campaigns
      operationId: update-campaign-by-id
      responses:
        '200':
          $ref: '#/components/responses/campaign'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '409':
          $ref: '#/components/responses/error'
      description: Update a campaign by id
      requestBody:
        $ref: '#/components/requestBodies/campaign_update'
      parameters:
        - schema:
            type: integer
          name: campaign_id
          in: path
          required: true
          description: Numeric ID of the campaign to update
  /campaigns:
    get:
      summary: List Campaigns
      tags:
        - Campaigns
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/campaign_collection'
                  - $ref: '#/components/schemas/campaign_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-campaigns
      description: >-
        Get a list of campaigns. The data fetched for each campaign depends on
        the values of query params. For example, if you use query parameter
        `full`; all properties are fetched.
    post:
      summary: Create A Campaign
      tags:
        - Campaigns
      operationId: create-campaign
      description: Create a campaign
      requestBody:
        $ref: '#/components/requestBodies/campaign_create'
      responses:
        '201':
          $ref: '#/components/responses/campaign'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /campaigns/{campaign_id}/history:
    get:
      operationId: campaign-audit-log
      summary: Campaign Audit Log
      description: Get a list of changes made to this campaign
      tags:
        - Campaigns
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: campaign_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the campaign
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /campaigns/{campaign_id}/budget_flights:
    get:
      summary: Get List Of Budget Flights
      tags:
        - Campaigns
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/full'
        - schema:
            type: integer
          name: campaign_id
          in: path
          required: true
          description: Numeric ID of the campaign
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/budget_flight_collection'
                  - $ref: '#/components/schemas/budget_flight_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-budget-flights
      description: Get a list of Budget Flights
  /campaigns/{campaign_id}/budget_flights/history:
    get:
      operationId: campaign-budget-flights-audit-log
      summary: Budget Flights for a given Campaign Audit Log
      description: Get a list changes to this campaign's budget flights
      tags:
        - Campaigns Budget Flights
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: campaign_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the campaign
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /campaigns/{campaign_id}/dynamic_budget_allocation:
    post:
      summary: Update Specific Campaign Dynamic Budget Allocation
      description: Legacy Endpoint - To be removed
      tags:
        - Campaigns
      operationId: update-dba-single
      parameters:
        - $ref: '#/components/parameters/full'
        - schema:
            type: integer
          name: campaign_id
          in: path
          required: true
          description: Numeric ID of the campaign
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/campaign_dba_collection'
                  - $ref: '#/components/schemas/campaign_dba_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '503':
          $ref: '#/components/responses/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dynamic_budget_allocation_applied:
                  type: string
                  format: date-time
                  nullable: true
                dynamic_budget_allocation_available:
                  type: string
                  format: date-time
                  nullable: true
  /campaign_dba:
    post:
      summary: Update Campaign Dynamic Budget Allocation
      description: This end point is restricted to a specific service account
      tags:
        - Campaigns
      operationId: update-dba
      responses:
        '200':
          $ref: '#/components/responses/dba_bulk'
        '207':
          $ref: '#/components/responses/dba_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/dba'
  /contextual_segments/cpm_estimate:
    post:
      operationId: post-contextual_segments-cpm_estimate
      tags:
        - Targeting
      summary: Contextual Segments CPM estimates
      description: Contextual Segments CPM estimates
      requestBody:
        $ref: '#/components/requestBodies/contextual_segment_estimate'
      responses:
        '200':
          $ref: '#/components/responses/contextual_segment_estimate'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /targeting_segments/frequently_used:
    get:
      operationId: get-targeting-segments_frequently-used
      tags:
        - Targeting
      summary: Frequently used Contextual Segments
      description: >-
        Display the most frequently used contextual segments for a given
        advertiser
      parameters:
        - in: query
          name: advertiser_id
          schema:
            type: integer
          description: Numeric ID of the advertiser to filter on
        - in: query
          name: top
          schema:
            type: integer
          description: limit of top elements
      responses:
        '200':
          $ref: '#/components/responses/targeting_segment_friendly_name'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /audience_segments/frequently_used:
    get:
      operationId: get-audience-segments_frequently-used
      tags:
        - Targeting
      summary: Frequently used Audience Segments
      description: >-
        Display the most frequently used audience segments for a given
        advertiser or campaign.
      parameters:
        - in: query
          name: advertiser_id
          schema:
            type: integer
          description: Numeric ID of the advertiser to filter on
        - in: query
          name: campaign_id
          schema:
            type: integer
          description: Numeric ID of the campaign to filter on
        - in: query
          name: top
          schema:
            type: integer
          description: limit of top elements
      responses:
        '200':
          $ref: '#/components/responses/targeting_segment_friendly_name'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /vendor_contracts:
    get:
      operationId: list-vendor_contracts
      summary: List Vendor Contracts
      description: List vendor contracts
      tags:
        - Vendor Contracts
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /strategy_templates:
    post:
      summary: Create Strategy Template
      tags:
        - Strategy Templates
      responses:
        '201':
          $ref: '#/components/responses/strategy_template_created'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/strategy_template_create'
      description: Create a strategy template
      operationId: create-strategy-template
    get:
      tags:
        - Strategy Templates
      summary: List Strategy Templates
      description: Get a list of strategy templates
      operationId: list-strategy-template
      parameters:
        - in: query
          name: global
          schema:
            type: boolean
          required: false
          description: Boolean value to get global strategy templates
        - in: query
          name: organization_id
          schema:
            type: integer
          required: false
          description: Numeric ID of the organization to get strategy templates for
        - in: query
          name: agency_id
          schema:
            type: integer
          required: false
          description: Numeric ID of the agency to get strategy templates for
        - in: query
          name: advertiser_id
          schema:
            type: integer
          required: false
          description: Numeric ID of the advertiser to get strategy templates for
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          description: strategy template list that matches the parameter criteria
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_template_response'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /marketplaces/{marketplace_id}:
    get:
      summary: Get a specific marketplace
      tags:
        - Marketplaces
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/marketplace_full'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-marketplace-by-id
      description: Get a marketplace by id
      parameters:
        - schema:
            type: integer
          name: marketplace_id
          in: path
          required: true
          description: Numeric ID of the marketplace to get
    post:
      summary: Update a marketplace
      tags:
        - Marketplaces
      operationId: update-marketplace-by-id
      responses:
        '200':
          $ref: '#/components/responses/marketplace'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      description: Update a marketplace by id
      requestBody:
        $ref: '#/components/requestBodies/marketplace_update'
      parameters:
        - schema:
            type: integer
          name: marketplace_id
          in: path
          required: true
          description: Numeric ID of the marketplace to update
  /marketplaces:
    get:
      summary: Get a list of marketplaces
      tags:
        - Marketplaces
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/marketplace_full'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-marketplaces
      description: Get a list of marketplaces
    post:
      summary: Create a marketplace
      tags:
        - Marketplaces
      operationId: create-marketplace
      description: Create a marketplace
      requestBody:
        $ref: '#/components/requestBodies/marketplace_create'
      responses:
        '201':
          $ref: '#/components/responses/marketplace'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /strategy_templates/{strategy_template_id}:
    post:
      parameters:
        - in: path
          name: strategy_template_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy_template object
      summary: Update a Strategy Template
      tags:
        - Strategy Templates
      responses:
        '200':
          $ref: '#/components/responses/strategy_template_updated'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '503':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/strategy_template_create'
      description: Update a strategy template
      operationId: update-strategy-template
    get:
      parameters:
        - in: path
          name: strategy_template_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy_template
      summary: Update a Strategy Template
      tags:
        - Strategy Templates
      responses:
        '200':
          $ref: '#/components/responses/strategy_template_updated'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '503':
          $ref: '#/components/responses/error'
      description: Get a strategy template
      operationId: get-strategy-template
    delete:
      parameters:
        - in: path
          name: strategy_template_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy_template
      summary: Delete a Strategy Template
      tags:
        - Strategy Templates
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '503':
          $ref: '#/components/responses/error'
      description: Delete a strategy template
      operationId: delete-strategy-template
  /users:
    get:
      operationId: list-users
      summary: List users
      description: Get a list of users
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/sort_order'
        - $ref: '#/components/parameters/q'
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: create-user
      summary: Create a User
      description: Create a user
      tags:
        - Users
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/user_create'
  /users/{user_id}:
    get:
      operationId: get-user
      tags:
        - Users
      summary: Get a User
      description: Get a User by its ID
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the user to get
        - $ref: '#/components/parameters/extended'
      responses:
        '200':
          description: User GET
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user_response'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-user
      description: Update a user by id
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the user to update
      summary: Update a User
      tags:
        - Users
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user_response'
        '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'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/user_update'
  /users/{user_id}/history:
    get:
      operationId: user-audit-log
      summary: User Audit Log
      description: Get a list changes to this user
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the user
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /users/{user_id}/settings:
    get:
      operationId: get-user-settings
      tags:
        - User Settings
      summary: Get a user's settings
      description: Get a user's settings by ID
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the user to get
      responses:
        '200':
          description: User Settings GET
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
    post:
      operationId: update-settings-user
      summary: Update Settings for a User
      description: Update Settings for a User
      tags:
        - Update User Settings
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the user
      responses:
        '200':
          description: OK
        '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'
  /permissions/{user_id}:
    get:
      operationId: list-permissions-user-id
      summary: Query User Permissions
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
        - in: query
          name: organization_id
          schema:
            type: array
            items:
              type: integer
          description: Numeric ID of the user
        - in: query
          name: agency_id
          schema:
            type: array
            items:
              type: integer
          description: Numeric ID of the agency
        - in: query
          name: advertiser_id
          schema:
            type: array
            items:
              type: integer
          description: Numeric ID of the advertiser
        - in: query
          name: campaign_id
          schema:
            type: array
            items:
              type: integer
          description: Numeric ID of the campaign
        - in: query
          name: strategy_id
          schema:
            type: array
            items:
              type: integer
          description: Numeric ID of the strategy
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/permission_list'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                    required:
                      - status
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: list-permissions-user-id-post
      summary: Query User Permissions
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      requestBody:
        $ref: '#/components/requestBodies/permission_check'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/permission_list'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                    required:
                      - status
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/organizations:
    get:
      operationId: list-permissions-user-id-organizations
      summary: List Permissions to All Organizations
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_organization'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/agencies:
    get:
      operationId: list-permissions-user-id-agencies
      summary: List Permissions to All Agencies
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_agency'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/advertisers:
    get:
      operationId: list-permissions-user-id-advertisers
      summary: List Permissions to All Advertisers
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_advertiser'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/campaigns:
    get:
      operationId: list-permissions-user-id-campaigns
      summary: List Permissions to All Campaigns
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_campaign'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/strategies:
    get:
      operationId: list-permissions-user-id-strategies
      summary: List Permissions to All Strategies
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_strategy'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /permissions/{user_id}/v2format:
    get:
      operationId: list-permissions-v2-user-id
      summary: Query User Permissions
      description: Get a list of permissions in V2 format
      tags:
        - Users
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/permission_v2_object'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                    required:
                      - status
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    post:
      operationId: list-permissions-v2-user-id-post
      summary: Query User Permissions
      description: Get a list of permissions
      tags:
        - Users
      parameters:
        - in: path
          name: user_id
          schema:
            type: integer
          required: true
          description: User ID
      requestBody:
        $ref: '#/components/requestBodies/permission_v2_check'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/permission_v2_object'
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                    required:
                      - status
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /roles:
    get:
      operationId: roles
      summary: Get
      description: Get list of roles
      tags:
        - General
      responses:
        '200':
          $ref: '#/components/responses/get_result'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /agencies/{agency_id}/permissions:
    get:
      operationId: list-permissions-agency
      summary: List User Permissions for an agency
      description: List User Permissions for an agency
      tags:
        - Agencies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: agency_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the agency
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_agency'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /advertisers/{advertiser_id}/permissions:
    get:
      operationId: list-permissions-advertiser
      summary: List User Permissions for an advertiser
      description: List User Permissions for an advertiser
      tags:
        - Advertisers
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: advertiser_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the advertiser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_advertiser'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /campaigns/{campaign_id}/permissions:
    get:
      operationId: list-permissions-campaign
      summary: List User Permissions Details
      description: List User Permissions Details
      tags:
        - Campaigns
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - in: path
          name: campaign_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the campaign
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_campaign'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/permissions:
    get:
      operationId: list-permissions-strategy
      summary: List User Permissions Details
      description: List Users with Permission
      tags:
        - Strategies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - in: path
          name: strategy_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the strategy
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_strategy'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /atomic_creatives:
    get:
      summary: List atomic creatives
      description: Get a list of atomic creatives
      tags:
        - Atomic Creatives
      responses:
        '200':
          $ref: '#/components/responses/atomic_creative_collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-atomic_creatives
    post:
      summary: Create atomic creative
      description: Create an atomic creative
      tags:
        - Atomic Creatives
      operationId: post-atomic_creatives
      responses:
        '201':
          $ref: '#/components/responses/atomic_creative'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/atomic_creative_create'
  /atomic_creatives/{atomic_creative_id}:
    get:
      summary: Get an atomic creative
      description: Get an atomic creative by ID
      tags:
        - Atomic Creatives
      responses:
        '200':
          $ref: '#/components/responses/atomic_creative'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-atomic_creatives-atomic_creative_id
      parameters:
        - schema:
            type: integer
          name: atomic_creative_id
          in: path
          required: true
          description: Numeric ID of the atomic creative to get
    post:
      summary: Update an atomic creative
      description: Update an atomic creative by ID
      tags:
        - Atomic Creatives
      operationId: post-atomic_creatives-atomic_creative_id
      responses:
        '200':
          $ref: '#/components/responses/atomic_creative'
        '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'
      requestBody:
        $ref: '#/components/requestBodies/atomic_creative_update'
      parameters:
        - schema:
            type: integer
          name: atomic_creative_id
          in: path
          required: true
          description: Numeric ID of the atomic creative to update
  /atomic_creatives/{atomic_creative_id}/history:
    get:
      operationId: atomic-creative-audit-log
      summary: Atomic Creative Audit Log
      description: Get a list changes to this atomic creative
      tags:
        - Atomic Creatives
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: atomic_creative_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the atomic creative
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /concepts:
    get:
      summary: List Concepts
      description: Get a list of concepts
      tags:
        - Concepts
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-concepts
    post:
      summary: Create concept
      description: Create a concept
      tags:
        - Concepts
      operationId: post-concept
      responses:
        '201':
          $ref: '#/components/responses/concept'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/concept_create'
  /concepts/{concept_id}:
    get:
      summary: Get a Concept
      description: Get a concept by ID
      tags:
        - Concepts
      responses:
        '200':
          $ref: '#/components/responses/concept'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-concepts-concept_id
      parameters:
        - schema:
            type: integer
          name: concept_id
          in: path
          required: true
          description: Numeric ID of the concept to get
    post:
      summary: Update a concept
      description: Update a concept by ID
      tags:
        - Concepts
      operationId: post-concepts-concept_id
      responses:
        '200':
          $ref: '#/components/responses/concept'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/concept_update'
      parameters:
        - schema:
            type: integer
          name: concept_id
          in: path
          required: true
          description: Numeric ID of the concept to update
  /concepts/{concept_id}/history:
    get:
      operationId: concepts-audit-log
      summary: Concepts Audit Log
      description: Get a list changes to this concept
      tags:
        - Concepts
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: concept_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the concept
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /bulk_update/atomic_creatives:
    post:
      description: Bulk update atomic creatives
      summary: Bulk update atomic creatives
      operationId: post-bulk_update-atomic_creatives
      tags:
        - Atomic Creatives
      responses:
        '200':
          $ref: '#/components/responses/atomic_creative_bulk'
        '207':
          $ref: '#/components/responses/atomic_creative_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/atomic_creative_bulk'
  /audit_log/agencies:
    post:
      operationId: agency-audit-log-bulk
      summary: Bulk Agency Audit Log
      description: Get a list of changes to these agencies
      tags:
        - Agencies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
  /audit_log/advertisers:
    post:
      operationId: advertiser-audit-log-bulk
      summary: Bulk Advertiser Audit Log
      description: Get a list of changes to these advertiser
      tags:
        - Advertisers
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
  /audit_log/campaigns:
    post:
      operationId: campaign-audit-log-bulk
      summary: Bulk Campaign Audit Log
      description: Get a list of changes to these campaigns
      tags:
        - Campaigns
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
  /audit_log/strategies:
    post:
      operationId: strategy-audit-log-bulk
      summary: Bulk Strategy Audit Log
      description: Get a list of changes to these strategies
      tags:
        - Strategies
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
  /search:
    get:
      operationId: search-entities
      summary: Search
      description: Search Organizations, Agencies or Advertisers by name
      tags:
        - General
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            default: 10
            maximum: 1000
          required: false
          description: number of elements in the collection to retrieve
        - in: query
          name: name
          schema:
            type: string
          required: true
          description: Search term
        - in: query
          name: active_only
          schema:
            type: boolean
          required: false
          description: only show active entities
        - in: query
          name: terminated
          schema:
            type: boolean
          required: false
          description: show terminated entities
      responses:
        '200':
          $ref: '#/components/responses/search_result'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /target_values:
    get:
      operationId: target-values
      summary: Get
      description: Get list of target values
      tags:
        - General
      parameters:
        - in: query
          name: name
          schema:
            type: string
          required: false
          description: Search name
      responses:
        '200':
          $ref: '#/components/responses/target_values_get_result'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /technology_target_values:
    get:
      operationId: technology-target-values
      summary: List technology target values
      description: Get list of technology target values
      tags:
        - Targeting
      parameters:
        - in: query
          name: name
          schema:
            type: string
          required: false
          description: Case insensitive name contains search
        - in: query
          name: full_path
          schema:
            type: string
          required: false
          description: Case insensitive full_path contains search
        - in: query
          name: dimension_code
          schema:
            type: string
          required: true
          description: Comma separated list of dimension codes
        - in: query
          name: sort_by
          schema:
            type: string
          required: false
          description: field to sort by (ascending default, prepend '-' for descending)
        - in: query
          name: q
          schema:
            type: string
          required: false
          description: common query searching and pattern matching for fields
      responses:
        '200':
          $ref: '#/components/responses/technology_target_values_get_result'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /path_targeting_segments:
    get:
      operationId: list-contextual-segments
      tags:
        - Targeting
      summary: Fetch Contextual Segments
      description: Get a list of contextual-segments
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /path_audience_segments:
    get:
      operationId: list-path-audience-segments
      tags:
        - Targeting
      summary: Fetch Path Audience Segments
      description: Get a list of path-audience-segments
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /entity_groups/{entity_group_id}/history:
    get:
      operationId: entity-group-audit-log
      summary: Entity Group Audit Log
      description: Get a list changes to this entity group
      tags:
        - Enterprise Controls
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - in: path
          name: entity_group_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the entity group
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /supply_sources:
    get:
      summary: List Supply Sources
      description: Get a list of Supply Sources
      tags:
        - Supply Sources
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-supply-sources
  /supply_sources/{supply_source_id}:
    get:
      summary: Get a Supply Source
      description: Get a supply source by ID
      tags:
        - Supply Sources
      responses:
        '200':
          $ref: '#/components/responses/supply_source'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-supply_sources-supply_source_id
      parameters:
        - schema:
            type: integer
          name: supply_source_id
          in: path
          required: true
          description: Numeric ID of the supply_source to get
  /vendors:
    get:
      summary: List Vendors
      tags:
        - Vendors
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/vendor_collection'
                  - $ref: '#/components/schemas/vendor_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-vendorss
      description: >-
        Get a list of vendors. The data fetched for each vendor depends on the
        values of query params. For example, if you use query parameter `full`
        all properties are fetched.
  /vendors/{vendor_id}:
    get:
      summary: Get A Specific Vendor
      tags:
        - Vendors
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/vendor_base'
                  meta:
                    $ref: '#/components/schemas/single_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      operationId: get-vendor-by-id
      description: Get a vendor by id
      parameters:
        - schema:
            type: integer
          name: vendor_id
          in: path
          required: true
          description: Numeric ID of the vendor to get
  /currency_rates:
    get:
      summary: List Currency Rates
      description: Get a list of Currency Rates
      tags:
        - Currency Rates
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/currency_rate_collection'
                  - $ref: '#/components/schemas/currency_rate_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-currency-rates
  /ad_servers:
    get:
      summary: List Ad Servers
      description: Get a list of Ad Servers
      tags:
        - Ad Servers
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ad_server_collection'
                  - $ref: '#/components/schemas/ad_server_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-ad-servers
  /site_lists:
    get:
      summary: List Site Lists
      description: Get a list of Site Lists
      tags:
        - Site Lists
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/site_list_collection'
                  - $ref: '#/components/schemas/site_list_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-site-lists
  /site_lists/{site_list_id}/download.csv:
    get:
      summary: CSV download of site information for a site list
      description: CSV download of site information for a site list
      tags:
        - Site Lists Site Download
      parameters:
        - in: path
          name: site_list_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the site list to get site list assignments
        - in: query
          name: target_type
          schema:
            type: string
          description: Filter the sites download by a target type
      responses:
        '200':
          description: Successful CSV download.
          headers:
            Content-Disposition:
              description: >-
                Indicates that the response should be handled as a file
                attachment.
              schema:
                type: string
          content:
            text/csv:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /site_lists/{site_list_id}/assignments:
    get:
      summary: List Site List Assignments
      description: A List of Site List Assignmentsfor a Site List
      tags:
        - Site Lists Assignments
      parameters:
        - in: path
          name: site_list_id
          schema:
            type: integer
          required: true
          description: Numeric ID of the site list to get site list assignments
        - $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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/site_list_assignment_collection'
                  - $ref: '#/components/schemas/site_list_assignment_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-site-list-assignments
  /timezones:
    get:
      summary: List Timezones
      description: Get a list of Timezones
      tags:
        - Timezones
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/timezone_collection'
                  - $ref: '#/components/schemas/timezone_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-timezones
  /targeting_segments:
    get:
      summary: List Targeting Segments
      description: Get a list of Targeting Segments
      tags:
        - Targeting Segments
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/targeting_segment_collection'
                  - $ref: '#/components/schemas/targeting_segment_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-targeting-segments
  /targeting_segment_objectives:
    get:
      summary: List Targeting Segment Objectives
      description: Get a list of Targeting Segment Objectives
      tags:
        - Targeting Segment Objectives
      responses:
        '200':
          $ref: '#/components/responses/collection'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-targeting-segment-objectives
  /targeting_segment_objectives/{objective_id}:
    get:
      summary: Get a Targeting Segment Objective
      description: Get a Targeting Segment Objective by ID
      tags:
        - Targeting Segment Objective
      responses:
        '200':
          $ref: '#/components/responses/targeting_segment_objective'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-targeting-segment-objective
      parameters:
        - schema:
            type: integer
          name: objective_id
          in: path
          required: true
          description: Numeric ID of the targeting_segment_objective to get
  /strategy_deals:
    get:
      summary: List Strategy Deals
      description: Get a list of Strategy Deals
      tags:
        - Strategy Deals
      parameters:
        - $ref: '#/components/parameters/page_limit'
        - $ref: '#/components/parameters/page_offset'
        - $ref: '#/components/parameters/sort_by'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/strategy_deals_with'
        - $ref: '#/components/parameters/full'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_deal_collection'
                  - $ref: '#/components/schemas/strategy_deal_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-deals
  /strategy_day_parts:
    get:
      summary: List Strategy Day Parts
      description: Get a list of Strategy Day Parts
      tags:
        - Strategy Day Parts
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_day_part_collection'
                  - $ref: '#/components/schemas/strategy_day_part_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-day-parts
  /strategy_groups:
    get:
      summary: List Strategy Groups of a Specific Campaign
      description: Get a list of Strategy Groups For a Specific Campaign
      tags:
        - Strategy Groups
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_group_collection'
                  - $ref: '#/components/schemas/strategy_group_collection_full'
                  - $ref: >-
                      #/components/schemas/strategy_group_collection_full_extended
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-groups
  /strategy_ip_addresses:
    get:
      summary: List Strategy IP Addresses
      description: Get a list of Strategy IP Addresses
      tags:
        - Strategy IP Addresses
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_ip_address_collection'
                  - $ref: '#/components/schemas/strategy_ip_address_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-ip-addresses
  /strategy_concepts:
    get:
      summary: List Strategy Concepts
      description: Get a list of Strategy Concepts
      tags:
        - Strategy Concepts
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_concept_collection'
                  - $ref: '#/components/schemas/strategy_concept_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-concepts
  /strategy_target_values:
    get:
      summary: List Strategy Target Values
      description: Get a list of Strategy Target Values
      tags:
        - Strategy Target Values
      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: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/strategy_target_value_collection'
                  - $ref: '#/components/schemas/strategy_target_value_collection_full'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: get-strategy-target-values
components:
  schemas:
    advertiser_create:
      allOf:
        - $ref: '#/components/schemas/advertiser_base'
        - type: object
          properties:
            agency_id:
              type: integer
              minimum: 1
          required:
            - name
            - agency_id
            - vertical_id
            - ad_server_id
    user_create:
      allOf:
        - $ref: '#/components/schemas/user_base'
        - type: object
          required:
            - first_name
            - last_name
            - username
            - roles
          properties:
            first_name:
              type: string
              minLength: 1
              maxLength: 32
            last_name:
              type: string
              minLength: 1
              maxLength: 32
            phone:
              type: string
              maxLength: 24
            username:
              type: string
              minLength: 1
              maxLength: 255
            roles:
              type: array
              items:
                type: integer
                format: int16
    advertiser_update:
      allOf:
        - $ref: '#/components/schemas/advertiser_base'
        - type: object
          properties:
            version:
              type: integer
              minimum: 0
    user_update:
      allOf:
        - $ref: '#/components/schemas/user_base'
        - type: object
          required:
            - version
            - first_name
            - last_name
            - roles
          properties:
            version:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            phone:
              type: string
            roles:
              type: array
              items:
                type: integer
                format: int16
    advertiser_base:
      title: advertiser
      type: object
      properties:
        ad_server_id:
          type: integer
        allow_x_strat_optimization:
          type: boolean
        billing_contact_id:
          type: integer
          minimum: 1
        data_sharing_enabled:
          type: boolean
        dmp_enabled:
          type: string
          enum:
            - disabled
            - inherits
        domain:
          type: string
          maxLength: 255
        external_id:
          type: string
          maxLength: 255
          nullable: true
        frequency_interval:
          type: string
          nullable: true
          enum:
            - hour
            - day
            - week
            - month
            - not-applicable
        frequency_type:
          type: string
          nullable: true
          enum:
            - no-limit
            - asap
            - even
        frequency_amount:
          type: integer
          nullable: true
        minimize_multi_ads:
          type: boolean
        name:
          type: string
        sales_contact_id:
          type: integer
          nullable: true
          minimum: 1
        status:
          type: boolean
        vertical_id:
          type: integer
        ads_txt_verified:
          type: string
          nullable: true
          enum:
            - ANY
            - AUTHORIZED_ONLY
            - AUTHORIZED_DIRECT_ONLY
            - NONE
        political:
          type: boolean
        connected_id_type:
          type: string
          enum:
            - DETERMINISTIC_FIRST
    user_base:
      title: user
      type: object
      properties:
        title:
          type: string
          maxLength: 64
        active:
          type: boolean
        language:
          type: string
        zone_name:
          type: string
    attachment_create:
      description: ''
      type: object
      properties:
        target_id:
          type: number
          minimum: 1
        strategy_id:
          type: number
          minimum: 0
        restriction:
          type: string
          minLength: 1
          enum:
            - INCLUDE
            - EXCLUDE
        operator:
          type: string
          minLength: 1
          enum:
            - OR
            - AND
        or_better:
          type: boolean
      required:
        - target_id
        - strategy_id
        - restriction
        - operator
    attachment_update:
      description: ''
      type: object
      properties:
        target_id:
          type: number
          minimum: 0
        version:
          type: number
        strategy_id:
          type: number
          minimum: 1
        restriction:
          type: string
          minLength: 1
          enum:
            - INCLUDE
            - EXCLUDE
        operator:
          type: string
          minLength: 1
          enum:
            - OR
            - AND
        or_better:
          type: boolean
      required:
        - version
    attachment_base:
      description: ''
      type: object
      title: ''
      properties:
        id:
          type: number
          minimum: 1
        entity_type:
          type: string
          minLength: 1
          readOnly: true
        target_id:
          type: number
          minimum: 0
        strategy_id:
          type: number
          minimum: 1
        restriction:
          type: string
          minLength: 1
          enum:
            - INCLUDE
            - EXCLUDE
        operator:
          type: string
          minLength: 1
          enum:
            - OR
            - AND
        created_on:
          type: string
          readOnly: true
        updated_on:
          type: string
          readOnly: true
        version:
          type: number
          readOnly: true
        or_better:
          type: boolean
      required:
        - id
        - entity_type
        - target_id
        - strategy_id
        - restriction
        - operator
        - created_on
        - updated_on
        - version
    target_base:
      description: ''
      type: object
      properties:
        parent_id:
          type: number
        name:
          type: string
          minLength: 1
        factual_id:
          type: string
        mediamath_organization_id:
          type: number
        target_inet:
          type: string
          minLength: 1
        visible:
          type: boolean
        visible_overridden:
          type: boolean
        bidder_frequency:
          type: number
        dimension_code:
          type: string
          minLength: 1
      required:
        - name
    target_create:
      allOf:
        - $ref: '#/components/schemas/target_base'
        - type: object
    target_update:
      description: ''
      type: object
      properties:
        parent_id:
          type: number
        name:
          type: string
          minLength: 1
        factual_id:
          type: string
        mediamath_organization_id:
          type: number
        target_inet:
          type: string
          minLength: 1
        visible:
          type: boolean
        visible_overridden:
          type: boolean
        bidder_frequency:
          type: number
        dimension_code:
          type: string
          minLength: 1
        version:
          type: integer
    advertiser_response:
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/advertiser_base'
            - type: object
              properties:
                id:
                  type: integer
                ad_server_fee:
                  type: number
                agency_id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
                effective_ads_txt_verified:
                  type: string
                agency:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    entity_type:
                      type: string
                    rel:
                      type: string
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
            next_page:
              type: string
            prev_page:
              type: string
    user_response:
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/user_base'
            - type: object
              properties:
                id:
                  type: integer
                entity_type:
                  type: string
                username:
                  type: string
                version:
                  type: integer
                first_name:
                  type: string
                last_name:
                  type: string
                link_ldap:
                  type: boolean
                link_saml:
                  type: boolean
                phone:
                  type: string
                mobile:
                  type: string
                fax:
                  type: string
                type:
                  type: string
                role:
                  type: string
                scope:
                  type: string
                view_organizations:
                  type: boolean
                edit_campaigns:
                  type: boolean
                edit_margins_and_performance:
                  type: boolean
                creator_id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                last_login_on:
                  type: string
                  nullable: true
                access_internal_fees:
                  type: boolean
                view_segments:
                  type: boolean
                edit_segments:
                  type: boolean
                view_data_definition:
                  type: boolean
                edit_data_definition:
                  type: boolean
                view_dmp_reports:
                  type: boolean
                email:
                  type: string
                roles:
                  type: array
                  items:
                    type: integer
                    format: int16
                permissions:
                  $ref: '#/components/schemas/user_permissions'
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    agency_create:
      allOf:
        - $ref: '#/components/schemas/agency_base'
        - type: object
          properties:
            organization_id:
              type: integer
              minimum: 1
          required:
            - organization_id
            - name
    agency_base:
      title: agency
      type: object
      properties:
        ads_txt_verified:
          type: string
          enum:
            - ANY
            - AUTHORIZED_ONLY
            - AUTHORIZED_DIRECT_ONLY
            - NONE
        allow_x_adv_optimization:
          type: boolean
        allow_x_adv_pixels:
          type: boolean
        dmp_enabled:
          type: string
          enum:
            - disabled
            - inherits
        eligible_for_data_sharing:
          type: boolean
        name:
          type: string
          minLength: 1
          maxLength: 64
        status:
          type: boolean
        logo:
          type: string
          maxLength: 1024
        sales_contact_id:
          type: integer
        billing_contact_id:
          type: integer
        traffic_contact_id:
          type: integer
    agency_response:
      title: agency_response
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/agency_base'
            - type: object
              properties:
                id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                organization_id:
                  type: integer
                  minimum: 1
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    pixel_bundle_base:
      title: pixel_bundle
      type: object
      properties:
        id:
          type: integer
          minimum: 1
        version:
          type: integer
        advertiser_id:
          type: integer
          nullable: true
        provider_id:
          type: integer
          nullable: true
          minimum: 1
        name:
          type: string
          minLength: 1
          maxLength: 64
        cost_pct_cpm:
          type: number
          nullable: true
        eligible:
          type: boolean
        tags:
          type: string
          nullable: true
        cost_cpm:
          type: number
          nullable: true
        external_identifier:
          type: string
        tag_type:
          type: string
          enum:
            - dfa
            - uat
            - image
            - iframe
            - js
        agency_id:
          type: integer
          nullable: true
        pricing:
          type: string
          enum:
            - CPM
            - CPTS
          nullable: true
        cost_cpts:
          type: number
          nullable: true
        pixel_type:
          type: string
          enum:
            - creative
            - event
            - data
            - segment
            - dynamic
        segment_op:
          type: string
          nullable: true
          enum:
            - AND
            - OR
        rmx_friendly:
          type: boolean
        rmx_merit:
          type: boolean
        rmx_pc_window_minutes:
          type: integer
          nullable: true
        rmx_pv_window_minutes:
          type: integer
          nullable: true
        rmx_conversion_type:
          type: string
          enum:
            - one
            - variable
        rmx_conversion_minutes:
          type: integer
        currency:
          type: string
          nullable: true
          enum:
            - S1
            - S2
            - V1
            - V2
        revenue:
          type: string
          nullable: true
          enum:
            - S1
            - S2
            - V1
            - V2
        currency_fixed:
          type: string
          nullable: true
        status:
          type: boolean
    creative_response:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/creative_base'
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    creative_base:
      title: creative
      type: object
      properties:
        atomic_creative_id:
          type: integer
          minimum: 1
        tag:
          type: string
        tag_type:
          type: string
          enum:
            - IFRAME_SCRIPT_NOSCRIPT
            - IFRAME_SCRIPT
            - IFRAME_NOSCRIPT
            - IFRAME_IMG
            - SCRIPT_NOSCRIPT
            - SCRIPT
            - NOSCRIPT
            - IFRAME
            - IMG
            - VIDEO
        inner_tag:
          type: string
    organization_base:
      title: organization
      type: object
      required:
        - name
        - status
        - mm_contact_name
        - adx_seat_account_id
        - connected_id_type
        - contact_name
        - address_1
        - city
        - state
        - zip
        - country
        - phone
        - currency_code
        - billing_country_code
        - dmp_enabled
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          description: >
            The name of the organization with whom the contract is held.

            This can be an agency holding company, agency, advertiser, network,
            or other media or data buying entity.
        org_type:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - buyer
              - partner
          description: >-
            The `org_type` field is an array that specifies the type of
            organization.
        status:
          type: boolean
        website:
          type: string
          maxLength: 512
          nullable: true
        facebook:
          type: string
          maxLength: 512
          nullable: true
        linkedin:
          type: string
          maxLength: 512
          nullable: true
        twitter:
          type: string
          maxLength: 512
          nullable: true
        allow_x_agency_pixels:
          type: boolean
          description: >
            This field enables the Data Co-op functionality across all the
            Advertisers under this organization.

            Cross-Advertiser Pixel Targeting allows Advertisers to target other
            Advertiser Event Pixels within their Agency and any other similarly
            enabled Agency under the same Organization.
        allow_byo_price:
          type: boolean
        opt_out_connected_id:
          type: boolean
        opt_out_connected_id_mathid:
          type: boolean
        override_suspicious_traffic_filter:
          type: boolean
          description: >-
            Set flag to 'on’ to be able to override default org wide suspicious
            traffic filter level.
        restrict_targeting_to_same_device_id:
          type: boolean
        restrict_targeting_to_deterministic_id:
          type: boolean
        suspicious_traffic_filter_level:
          type: integer
          minimum: 0
          maximum: 100
          description: >
            Specify an organization-wide level of suspicious traffic filtering
            to use. See the Knowledge Base for additional details about this
            feature. This setting will only take affect if the organization's
            override_suspicious_traffic_filter property is set to 'on'.

            If override_suspicious_traffic_filter is enabled and
            suspicious_traffic_filter_level is set to 0, all fraud and
            suspicious traffic will be filtered.
        use_ads_txt:
          type: boolean
        use_evidon_opt_out:
          type: boolean
          nullable: true
          description: >-
            Set flag to 'on’ to show an opt out button on the organization's ads
            (additional CPM fee will apply when on).
        eligible_for_data_sharing:
          type: boolean
        holding_org_id:
          type: integer
          nullable: true
        service_provider_ccpa:
          type: boolean
        mm_contact_name:
          type: string
          maxLength: 64
          description: >-
            This is the name of the primary internal MediaMath contact of the
            Organization.
        adx_seat_account_id:
          type: integer
          minimum: 1
          description: >-
            Passed to ADX upon creative registration so ADX knows which seat
            we're registering under.
        connected_id_type:
          type: string
          enum:
            - DETERMINISTIC_FIRST
        contact_name:
          type: string
          maxLength: 64
          description: >-
            This is the primary contact at the organization regarding contract
            issues.
        address_1:
          type: string
          maxLength: 256
          description: >-
            The primary address line, typically includes street address and
            number.
        address_2:
          type: string
          maxLength: 256
          nullable: true
          description: >-
            The secondary address line, used for additional information such as
            apartment, suite, or unit number.
        city:
          type: string
          maxLength: 32
          description: The city of the address.
        state:
          type: string
          maxLength: 2
          description: The state of the address, represented as a 2-character code.
        zip:
          type: string
          maxLength: 10
          description: The postal or ZIP code for the address.
        country:
          type: string
          maxLength: 2
          description: >-
            The country of the address, represented as a 2-character ISO country
            code.
        phone:
          type: string
          maxLength: 24
          description: >-
            The phone number associated with the address, including country code
            if applicable.
        currency_code:
          type: string
          maxLength: 3
          description: Currency code for the campaign budget and spend, as well as billing.
        billing_country_code:
          type: string
          description: Country code that is used for billing purposes.
        dmp_enabled:
          type: string
          enum:
            - enabled
            - disabled
        tag_ruleset:
          type: string
          maxLength: 64
          nullable: true
    organization_response:
      title: organization_response
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/organization_base'
            - type: object
              properties:
                id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                terminated:
                  type: boolean
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    strategy_plan_request:
      title: strategy plan request
      allOf:
        - type: object
          required:
            - name
            - duration
            - budget
            - zone_name
          properties:
            name:
              type: string
            zone_name:
              type: string
            budget:
              type: object
              properties:
                budget:
                  type: number
                  format: float
                  description: >-
                    Must be a valid float between 1 and 10000000 USD or its
                    equivalent in foreign currency. Required if max_bid is
                    absent.
                currency_code:
                  type: string
                  maxLength: 3
                  description: currency code for the budget
              required:
                - currency_code
            goals:
              type: object
              properties:
                max_bid:
                  type: number
                  format: float
                  description: Required if budget is absent.
        - type: object
          required:
            - channels
            - targeting
            - inventory
            - frequency
            - creatives
          properties:
            campaign_plan_id:
              type: integer
              format: int32
            advertiser_id:
              type: integer
              format: int32
            duration:
              $ref: '#/components/schemas/duration_base'
            channels:
              type: array
              items:
                type: string
                enum:
                  - display
                  - video
                  - audio
                  - ctv
            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
            frequency:
              $ref: '#/components/schemas/frequency_base'
            targeting:
              $ref: '#/components/schemas/targeting_base'
            inventory:
              $ref: '#/components/schemas/inventory_base'
            forecast:
              $ref: '#/components/schemas/forecast_request'
    strategy_plan_response:
      title: strategy plan response
      additionalProperties: false
      type: object
      properties:
        id:
          type: integer
          format: int32
        version:
          type: integer
          format: int32
        campaign_plan_id:
          type: integer
          format: int32
        advertiser:
          type: object
          properties:
            advertiser_id:
              type: integer
            advertiser_name:
              type: string
        name:
          type: string
          minLength: 1
          maxLength: 256
          example: strategy plan test
        duration:
          type: object
          properties:
            start_date:
              type: string
              format: date-time
              example: '2050-01-01T16:00:00.000Z'
              description: start_date can not be in the past
              nullable: true
            end_date:
              type: string
              format: date-time
              example: '2050-01-20T16:00:00.000Z'
              description: end_date must be between 1 and 30 days away from start_date
              nullable: true
        zone_name:
          type: string
          example: America/Denver
          description: zone name where start_date and end_date belong
        budget:
          type: object
          properties:
            budget:
              type: number
              format: float
              minimum: 1
              maximum: 99999999999999.98
              example: 1000.5
            currency_code:
              type: string
              maxLength: 3
              example: USD
              description: currency code for the budget
            forecast_impressions:
              type: integer
              nullable: true
            forecast_price:
              type: number
              nullable: true
            forecast_uniques:
              type: integer
              nullable: true
        goals:
          type: object
          properties:
            max_bid:
              type: number
              format: float
        creatives:
          type: object
          properties:
            ad_formats:
              type: array
              nullable: true
              items:
                type: string
              example:
                - DISPLAY
                - EXPANDABLE
                - MOBILE
            ad_sizes:
              type: array
              nullable: true
              items:
                type: string
              example:
                - 728x90
                - 425x600
                - 300x600
                - 300x250
        channels:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - display
              - video
              - audio
              - ctv
          example:
            - display
        frequency:
          properties:
            frequency_type:
              type: string
              enum:
                - no-limit
                - asap
                - even
              description: >-
                if no-limit is selected, then frequency_amount is not required
                and frequency_interval must be not-applicable
              example: no-limit
            frequency_amount:
              type: integer
              example: 1
            frequency_interval:
              type: string
              enum:
                - not-applicable
                - hour
                - day
                - week
                - month
              example: not-applicable
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        forecast_date:
          type: string
          format: date-time
          nullable: true
          description: can be null when strategy plan has no forecast
        forecast_query:
          type: object
          properties:
            endDate:
              type: string
            expression:
              type: string
            freqCap:
              type: integer
            freqDur:
              type: string
            startDate:
              type: string
        targeting:
          $ref: '#/components/schemas/targeting_base'
        inventory:
          $ref: '#/components/schemas/inventory_base'
        forecast:
          $ref: '#/components/schemas/forecast'
    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
    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 an schema error
                type: string
              message:
                type: string
        meta:
          type: object
          required:
            - status
          properties:
            status:
              type: string
    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
    forecast:
      title: forecast
      type: object
      nullable: true
      required:
        - data
        - meta
      properties:
        data:
          type: object
          required:
            - errors
            - flags
            - opps
            - pricing
            - uniques
          properties:
            errors:
              type: string
              nullable: true
              example: null
              description: when forecast is successful this value is null
            flags:
              type: string
              nullable: true
              example: null
              description: when forecast is successful this value is null
            opps:
              type: integer
              example: 216000
            pricing:
              type: array
              items:
                properties:
                  impressions:
                    type: integer
                  price:
                    type: string
                    example: '7.665749'
                  spend:
                    type: string
                    example: '352816.151476'
                  uniques:
                    type: integer
                required:
                  - impressions
                  - price
                  - spend
                  - uniques
            uniques:
              type: integer
              example: 156270
        meta:
          type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - success
              example: success
    duration_base:
      type: object
      properties:
        start_date:
          type: string
          format: date-time
          description: start_date can not be in the past
          nullable: true
        end_date:
          type: string
          format: date-time
          description: end_date must be between 1 and 30 days away from start_date
          nullable: true
      required:
        - start_date
        - end_date
    frequency_base:
      required:
        - frequency_type
        - frequency_interval
      properties:
        frequency_type:
          type: string
          enum:
            - no-limit
            - asap
            - even
          description: >-
            if no-limit is selected, then frequency_amount is not required and
            frequency_interval must be not-applicable
        frequency_amount:
          type: integer
        frequency_interval:
          type: string
          enum:
            - not-applicable
            - hour
            - day
            - week
            - month
    forecast_request:
      type: object
      required:
        - forecast_date
        - forecast_result
      properties:
        forecast_date:
          type: string
          format: date-time
          example: '2050-01-01T16:00:00.000Z'
        forecast_result:
          $ref: '#/components/schemas/forecast'
      nullable: true
    targeting_base:
      type: object
      properties:
        audience:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/audience_target'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/audience_target'
        contextual:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_include'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_exclude'
        my_data:
          type: object
          properties:
            include:
              type: object
              properties:
                pixel_bundle_ids:
                  type: array
                  items:
                    type: integer
                operator:
                  type: string
                  enum:
                    - AND
                    - OR
            exclude:
              type: object
              properties:
                pixel_bundle_ids:
                  type: array
                  items:
                    type: integer
        location:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_include'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_exclude'
        technology:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_include'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/target_dimension_exclude'
        day_parts:
          type: array
          items:
            $ref: '#/components/schemas/day_part'
    audience_target:
      type: object
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
        audience_segment_ids:
          type: array
          items:
            type: number
    target_dimension_include:
      type: object
      properties:
        code:
          type: string
          description: >-
            valid location codes - DMAX, REGN, USZC | valid technology codes - 
            BSER, CSPD, DVCE, ISPX, OSXX, INVT, DVMD | valid contextual codes - 
            SFTY
        operator:
          type: string
          enum:
            - AND
            - OR
        target_value_ids:
          type: array
          items:
            type: number
      required:
        - code
        - operator
        - target_value_ids
    target_dimension_exclude:
      type: object
      properties:
        code:
          type: string
          description: >-
            valid location codes - DMAX, REGN, USZC | valid technology codes - 
            BSER, CSPD, DVCE, ISPX, OSXX, INVT, DVMD | valid contextual codes - 
            SFTY
        operator:
          type: string
          enum:
            - AND
            - OR
        target_value_ids:
          type: array
          items:
            type: number
      required:
        - target_value_ids
    inventory_base:
      type: object
      anyOf:
        - properties:
            supply_source_ids:
              type: array
              items:
                type: integer
            run_on_all_exchanges:
              type: boolean
            run_on_all_pmp:
              type: boolean
            deal_ids:
              type: array
              items:
                type: integer
            deal_group_ids:
              type: array
              items:
                type: integer
            site_list_ids:
              type: array
              items:
                type: integer
    domain_restriction:
      type: object
      required:
        - domain
        - target_type
      properties:
        domain:
          type: string
          example: www.mediamath.com
        target_type:
          type: string
          enum:
            - DOMAIN
            - APP
    targeting_postal_codes:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
        codes:
          writeOnly: true
          type: array
          items:
            type: string
          example:
            - us-14392
            - us-24981
            - us-25632
            - us-16191
            - us-48574
            - us14392
            - us24981
            - us25632
            - us16191
            - us48574
            - '14392'
            - '24981'
            - '25632'
            - '16191'
            - '48574'
    targeting_ip_addresses:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
        codes:
          writeOnly: true
          type: array
          items:
            type: string
    location_response:
      description: ''
      type: object
      properties:
        strategy_id:
          type: number
        strategy_target_id:
          type: number
        strategy_target_exclude:
          type: boolean
        strategy_target_active:
          type: boolean
        strategy_target_operator:
          type: string
          minLength: 1
        strategy_target_value_id:
          type: number
        target_dimension_code:
          type: string
          minLength: 1
        target_dimension_name:
          type: string
          minLength: 1
        target_value_id:
          type: number
        target_value_name:
          type: string
          minLength: 1
        target_value_value:
          type: number
        target_value_code:
          type: string
          minLength: 1
        strategy_count:
          type: number
      required:
        - strategy_id
        - strategy_target_id
        - strategy_target_exclude
        - strategy_target_active
        - strategy_target_operator
        - strategy_target_value_id
        - target_dimension_code
        - target_dimension_name
        - target_value_id
        - target_value_name
        - target_value_value
        - target_value_code
        - strategy_count
      x-examples:
        example-1:
          strategy_id: 65
          strategy_target_exclude: false
          strategy_target_active: true
          strategy_target_operator: OR
          target_dimension_code: REGN
          target_dimension_name: nameface REGN
          target_value_id: 18
          target_value_name: target values item
          target_value_value: 123123
          target_value_code: Target Value 1
          strategy_count: 2
      title: ''
    campaign_details:
      type: object
      properties:
        archived:
          type: boolean
          default: false
        status:
          type: boolean
          default: true
        name:
          type: string
          minLength: 1
          maxLength: 256
        service_type:
          type: string
          enum:
            - SELF
            - MANAGED
        io_name:
          type: string
          maxLength: 256
        io_reference_num:
          type: string
          maxLength: 32
        is_programmatic_guaranteed:
          type: boolean
        political:
          type: boolean
          default: false
        source_campaign_id:
          type: integer
          nullable: true
        zone_name:
          type: string
          minLength: 1
    campaign_identity:
      type: object
      properties:
        device_graph_only:
          type: boolean
          default: false
        bid_min_devices:
          type: integer
          default: 1
          minimum: 1
          maximum: 5
        connected_id_type:
          type: string
          nullable: true
          enum:
            - DETERMINISTIC_FIRST
    campaign_ad_server:
      type: object
      properties:
        ad_server_id:
          type: integer
        ad_server_username:
          type: string
          maxLength: 64
        ad_server_password:
          type: string
          maxLength: 64
        use_default_ad_server:
          type: boolean
          default: true
        ad_server_fee:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
    campaign_duration:
      type: object
      properties:
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
    campaign_goals:
      type: object
      properties:
        goal_type:
          type: string
          enum:
            - spend
            - reach
            - cpc
            - cpe
            - cpa
            - roi
            - ctr
            - vcr
            - viewability_rate
            - vcpm
            - cpcv
        goal_alert:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
        goal_value:
          type: number
          format: float
          minimum: 0.0001
          maximum: 9999999.9999
        goal_category:
          type: string
          enum:
            - audience
            - engagement
            - response
          nullable: true
    campaign_budget:
      type: object
      properties:
        currency_code:
          type: string
          minLength: 3
          maxLength: 3
          example: USD
        margin_pct:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.9999
        dynamic_budget_allocation_type:
          type: string
          enum:
            - SBA_AUTO_ALLOCATION
            - SBA_RECOMMENDATIONS_ONLY
            - 'OFF'
          default: 'OFF'
        dynamic_budget_allocation_applied:
          type: string
          format: date-time
        dynamic_budget_allocation_available:
          type: string
          format: date-time
    campaign_frequency:
      type: object
      properties:
        frequency_type:
          type: string
          enum:
            - even
            - asap
            - no-limit
            - t1-optimized
        frequency_interval:
          type: string
          minLength: 1
          enum:
            - hour
            - day
            - week
            - month
            - campaign
            - not-applicable
          default: not-applicable
        frequency_amount:
          type: integer
          nullable: true
        use_mm_freq:
          type: boolean
          default: false
        frequency_optimization:
          type: boolean
          default: false
    campaign_pacing:
      type: object
      properties:
        pacing_alert:
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 999.99
        impression_cap_automatic:
          type: boolean
          default: false
        impression_cap_amount:
          type: integer
          nullable: true
        impression_cap_type:
          type: string
          enum:
            - even
            - asap
            - no-limit
            - t1-optimized
          default: no-limit
        spend_cap_type:
          type: string
          default: no-limit
          enum:
            - even
            - asap
            - no-limit
            - t1-optimized
        spend_cap_amount:
          type: number
          nullable: true
          format: float
          default: 0
          minimum: 0
          maximum: 9999999.99
        spend_cap_automatic:
          type: boolean
          default: true
        brain_intraday_pacing:
          type: boolean
          default: false
    campaign_inventory:
      type: object
      properties:
        ads_txt_verified:
          type: string
          enum:
            - ANY
            - AUTHORIZED_ONLY
            - AUTHORIZED_DIRECT_ONLY
            - NONE
          nullable: true
        minimize_multi_ads:
          type: boolean
          default: false
        override_suspicious_traffic_filter:
          type: boolean
          default: false
        suspicious_traffic_filter_level:
          type: integer
          default: 25
          minimum: 0
          maximum: 100
        dcs_data_is_campaign_level:
          type: boolean
          default: false
        restrict_targeting_to_deterministic_id:
          type: boolean
          default: false
        restrict_targeting_to_same_device_id:
          type: boolean
    campaign_attribution:
      type: object
      properties:
        has_custom_attribution:
          type: boolean
          default: false
        custom_attribution_source:
          type: string
          enum:
            - 3rd Party Attribution
            - T1 MTA via Neustar
          nullable: true
        pc_window_minutes:
          type: integer
        pv_window_minutes:
          type: integer
        pv_pct:
          type: number
          format: float
          default: 100
          minimum: 0
          maximum: 100
        merit_pixel_id:
          type: integer
          nullable: true
        conversion_type:
          type: string
          enum:
            - every
            - one
            - variable
          default: variable
        conversion_variable_minutes:
          type: integer
          default: 1
    campaign_budget_flights:
      type: object
      properties:
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        total_budget:
          type: number
          format: float
        total_impression_budget:
          nullable: true
          type: integer
    vendor_contract:
      type: object
      required:
        - vendor_id
      properties:
        vendor_id:
          type: integer
        use_mm_contract:
          type: boolean
        price:
          type: number
          format: float
          nullable: true
        rate_card_type:
          type: string
          nullable: true
          enum:
            - CPM
            - FIXED
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
        site_lists:
          $ref: '#/components/schemas/campaign_site_list'
    campaign_viewability:
      type: object
      nullable: true
      required:
        - vendor_id
        - sample_rate
        - type
      properties:
        vendor_id:
          type: integer
        type:
          type: string
          enum:
            - AUTO_TAG
            - BYOV
        sample_rate:
          type: number
          format: float
          minimum: 0
          maximum: 1
    campaign_create:
      type: object
      allOf:
        - $ref: '#/components/schemas/campaign_details'
        - type: object
          required:
            - name
            - service_type
            - budget
          properties:
            advertiser_id:
              type: integer
              minimum: 1
            identity:
              $ref: '#/components/schemas/campaign_identity'
            ad_server:
              $ref: '#/components/schemas/campaign_ad_server'
            goals:
              $ref: '#/components/schemas/campaign_goals_create'
            budget:
              allOf:
                - $ref: '#/components/schemas/campaign_budget'
                - required:
                    - currency_code
                    - margin_pct
                    - flights
                  properties:
                    flights:
                      type: array
                      minItems: 1
                      items:
                        $ref: '#/components/schemas/campaign_budget_flights'
            frequency:
              $ref: '#/components/schemas/campaign_frequency'
            pacing:
              $ref: '#/components/schemas/campaign_pacing'
            inventory:
              $ref: '#/components/schemas/campaign_inventory'
            attribution:
              $ref: '#/components/schemas/campaign_attribution'
            viewability:
              $ref: '#/components/schemas/create_campaign_viewability'
            vendor_contracts:
              type: array
              items:
                $ref: '#/components/schemas/vendor_contract'
            site_lists:
              type: array
              items:
                type: object
                required:
                  - id
                  - assigned
                properties:
                  id:
                    type: integer
                  assigned:
                    type: boolean
            custom_brain_selections:
              type: array
              items:
                type: object
                properties:
                  selection_id:
                    type: integer
                  selection_type:
                    enum:
                      - Audience Target
                      - Data Pixel
                      - Event Pixel
                      - Segment
                      - Dynamic
    campaign_full:
      allOf:
        - $ref: '#/components/schemas/campaign_details'
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            advertiser_id:
              type: integer
              readOnly: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
            identity:
              $ref: '#/components/schemas/campaign_identity'
            ad_server:
              $ref: '#/components/schemas/campaign_ad_server'
            duration:
              allOf:
                - $ref: '#/components/schemas/campaign_duration'
                - type: object
                  properties:
                    initial_start_date:
                      type: string
                      format: date-time
            goals:
              $ref: '#/components/schemas/campaign_goals'
            budget:
              allOf:
                - $ref: '#/components/schemas/campaign_budget'
                - type: object
                  properties:
                    total_budget:
                      type: number
                    total_impression_budget:
                      nullable: true
                      type: number
                    flights:
                      type: array
                      items:
                        $ref: '#/components/schemas/campaign_budget_flight'
            frequency_cap:
              $ref: '#/components/schemas/campaign_frequency'
            pacing:
              $ref: '#/components/schemas/campaign_pacing'
            inventory:
              allOf:
                - $ref: '#/components/schemas/campaign_inventory'
                - type: object
                  properties:
                    effective_ads_txt_verified:
                      type: string
                      minLength: 1
                      enum:
                        - ANY
                        - AUTHORIZED_ONLY
                        - AUTHORIZED_DIRECT_ONLY
                        - NONE
            attribution:
              $ref: '#/components/schemas/campaign_attribution'
            budget_flights:
              type: array
              items:
                $ref: '#/components/schemas/budget_flight_full'
            viewability:
              $ref: '#/components/schemas/campaign_viewability'
            vendor_contracts:
              type: array
              items:
                $ref: '#/components/schemas/vendor_contract'
            site_lists:
              type: array
              items:
                $ref: '#/components/schemas/campaign_site_list'
            custom_brain_selections:
              type: array
              items:
                $ref: '#/components/schemas/campaign_custom_brain_selection'
            strategies:
              type: object
              properties:
                count:
                  type: integer
                strategies_list:
                  type: array
                  items:
                    type: integer
                    format: int32
                distinct_strategy_goal_types:
                  type: array
                  items:
                    type: string
                    enum:
                      - spend
                      - reach
                      - cpc
                      - cpe
                      - cpa
                      - roi
                      - ctr
                      - vcr
                      - viewability_rate
                      - vcpm
                      - cpcv
            strategy_groups:
              type: object
              properties:
                count:
                  type: integer
                strategy_groups_list:
                  type: array
                  items:
                    type: string
    campaign_bulk:
      description: ''
      type: object
      allOf:
        - $ref: '#/components/schemas/campaign_details'
        - type: object
          required:
            - id
          properties:
            id:
              type: integer
              minimum: 1
            identity:
              $ref: '#/components/schemas/campaign_identity'
            ad_server:
              $ref: '#/components/schemas/campaign_ad_server'
            goals:
              $ref: '#/components/schemas/campaign_goals'
            duration:
              $ref: '#/components/schemas/campaign_duration'
            budget:
              allOf:
                - $ref: '#/components/schemas/campaign_budget'
                - type: object
                  properties:
                    total_impression_budget:
                      type: number
                      nullable: true
                    total_budget:
                      type: number
                    flights:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          start_date:
                            type: string
                            format: date-time
                          end_date:
                            type: string
                            format: date-time
                          total_budget:
                            type: number
                            format: float
                          total_impression_budget:
                            nullable: true
                            type: integer
            frequency:
              $ref: '#/components/schemas/campaign_frequency'
            pacing:
              $ref: '#/components/schemas/campaign_pacing'
            inventory:
              $ref: '#/components/schemas/campaign_inventory'
            attribution:
              $ref: '#/components/schemas/campaign_attribution'
            viewability:
              $ref: '#/components/schemas/campaign_viewability'
            vendor_contracts:
              type: array
              items:
                $ref: '#/components/schemas/vendor_contract'
    marketplace_create:
      type: object
      allOf:
        - $ref: '#/components/schemas/marketplace_full'
        - type: object
          required:
            - name
            - strategy_id
    marketplace_update:
      type: object
      allOf:
        - $ref: '#/components/schemas/marketplace_full'
    marketplace_full:
      type: object
      properties:
        id:
          type: integer
        version:
          type: integer
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
        name:
          type: string
          minLength: 1
        supply_type:
          type: string
          minLength: 1
        status:
          type: boolean
        rtb_enabled:
          type: boolean
        strategy_id:
          type: integer
        code:
          type: string
          minLength: 1
        bidder_exchange_identifier:
          type: integer
        rtb_type:
          type: string
          minLength: 1
        has_display:
          type: boolean
        has_mobile_display:
          type: boolean
        has_video:
          type: boolean
        has_mobile_video:
          type: boolean
        requires_creative_audit:
          type: boolean
        has_desktop_video:
          type: boolean
        has_connected_tv:
          type: boolean
        mma_free:
          type: boolean
        private:
          type: boolean
        mkt_sell_price:
          type: number
          format: float
          minimum: -1
          nullable: true
        mkt_sell_price_currency_code:
          type: string
          minLength: 3
          maxLength: 3
          example: USD
          nullable: true
        permission_organizations:
          type: array
          items:
            type: integer
            format: int32
        permission_agencies:
          type: array
          items:
            type: integer
            format: int32
    strategy_template_response:
      title: strategy template response
      additionalProperties: false
      type: object
      properties:
        id:
          type: integer
          format: int32
        global:
          type: boolean
        organization_id:
          type: integer
          format: int32
        agency_id:
          type: integer
          format: int32
        advertiser_id:
          type: integer
          format: int32
        name:
          type: string
          minLength: 1
          maxLength: 256
          example: strategy template test
        descriptiom:
          type: string
          minLength: 1
          example: this is a strategy template
        creator_id:
          type: integer
          format: int32
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
    single_metadata:
      title: single_metadata
      type: object
      properties:
        status:
          type: string
          example: success
      required:
        - status
    strategy_full:
      allOf:
        - $ref: '#/components/schemas/strategy_details'
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            campaign_id:
              type: integer
            zone_name:
              type: string
              example: America/New_York
              readOnly: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
            duration:
              $ref: '#/components/schemas/strategy_duration'
            budget:
              $ref: '#/components/schemas/strategy_budget'
            pacing:
              $ref: '#/components/schemas/strategy_pacing'
            goals:
              $ref: '#/components/schemas/strategy_goals'
            frequency:
              $ref: '#/components/schemas/strategy_frequency'
            inventory:
              $ref: '#/components/schemas/strategy_inventory'
            targeting:
              $ref: '#/components/schemas/strategy_targeting'
            concepts:
              $ref: '#/components/schemas/strategy_concepts_extended'
      description: ''
    strategy_full_extended:
      allOf:
        - $ref: '#/components/schemas/strategy_details'
        - type: object
          properties:
            id:
              type: integer
              readOnly: true
            version:
              type: integer
            advertiser_id:
              type: integer
              readOnly: true
            campaign_id:
              type: integer
              readOnly: true
            campaign_name:
              type: string
              readOnly: true
            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
              readOnly: true
            campaign_service_type:
              type: string
              readOnly: true
            zone_name:
              type: string
              example: America/New_York
              readOnly: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
            duration:
              $ref: '#/components/schemas/strategy_duration'
            budget:
              $ref: '#/components/schemas/strategy_budget'
            pacing:
              $ref: '#/components/schemas/strategy_pacing'
            goals:
              $ref: '#/components/schemas/strategy_goals'
            frequency:
              $ref: '#/components/schemas/strategy_frequency'
            inventory:
              $ref: '#/components/schemas/strategy_inventory_extended'
            targeting:
              $ref: '#/components/schemas/strategy_targeting_extended'
            concepts:
              $ref: '#/components/schemas/strategy_concepts_extended'
      description: ''
    strategy_details:
      type: object
      properties:
        name:
          type: string
          maxLength: 128
        description:
          type: string
          maxLength: 1024
        status:
          type: boolean
        archived:
          type: boolean
          default: false
        is_programmatic_guaranteed:
          type: boolean
          default: false
        media_type:
          type: string
          enum:
            - DISPLAY
            - VIDEO
        use_optimization:
          type: boolean
        ads_txt_verified:
          type: string
          enum:
            - ANY
            - AUTHORIZED_ONLY
            - AUTHORIZED_DIRECT_ONLY
            - NONE
            - ''
          nullable: true
        type:
          type: string
          enum:
            - REM
            - GBO
            - AUD
        feature_compatibility:
          type: string
          maxLength: 1024
          nullable: true
        device_graph_only:
          type: boolean
    strategy_pacing:
      type: object
      additionalProperties: false
      properties:
        impression_pacing_type:
          type: string
          enum:
            - even
            - asap
            - no-limit
        impression_pacing_amount:
          type: integer
          minimum: 1
          nullable: true
        impression_pacing_interval:
          type: string
          enum:
            - hour
            - day
        pacing_type:
          type: string
          enum:
            - even
            - asap
        pacing_amount:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
          nullable: true
        pacing_interval:
          type: string
          enum:
            - hour
            - day
        pacing_optimization_type:
          type: string
          enum:
            - monetary
            - impression
        pacing_optimization_amount:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
          nullable: true
        use_dba_strategy_pacing:
          type: string
          enum:
            - always
            - never
            - custom
        use_dba_strategy_pacing_after_date:
          type: string
          format: date
          nullable: true
    strategy_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
        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
        flat_rate_cpm:
          type: number
          format: float
          minimum: 0.01
          maximum: 9999999.99
          nullable: true
    strategy_frequency:
      type: object
      additionalProperties: false
      properties:
        frequency_type:
          type: string
          enum:
            - even
            - asap
            - no-limit
            - t1-optimized
        frequency_interval:
          type: string
          enum:
            - hour
            - day
            - week
            - month
            - campaign
            - not-applicable
        frequency_amount:
          type: integer
        frequency_optimization:
          type: boolean
    strategy_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_budget:
      type: object
      properties:
        budget:
          type: number
          format: float
          description: >-
            Must be a valid float between 1 and 10000000 USD or its equivalent
            in foreign currency.
          nullable: true
        currency_code:
          type: string
        margin_pct:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.9999
          nullable: true
    strategy_concepts:
      type: object
      properties:
        weighting:
          type: string
          enum:
            - NONE
            - BUDGET
            - IMPRESSION
        creative_groups:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              concept_id:
                type: integer
              percent:
                type: number
                format: float
                description: sum of all percents provided inside group must be equal to 100
                minimum: 0
                maximum: 100
                exclusiveMinimum: false
            required:
              - concept_id
              - percent
    strategy_concepts_extended:
      type: object
      properties:
        weighting:
          type: string
          enum:
            - NONE
            - BUDGET
            - IMPRESSION
        creative_groups:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              concept_id:
                type: integer
              percent:
                type: number
                format: float
                description: sum of all percents provided inside group must be equal to 100
                minimum: 0
                maximum: 100
                exclusiveMinimum: false
              name:
                type: string
                maxLength: 128
                description: available only when extended
                readOnly: true
              status:
                type: boolean
                description: available only when extended
                readOnly: true
              created_on:
                type: string
                format: date-time
                description: available only when extended
                nullable: true
                readOnly: true
              start_date:
                type: string
                format: date-time
                description: available only when extended
                nullable: true
                readOnly: true
              assigned_creatives_count:
                type: integer
                minimum: 0
                description: available only when extended
                readOnly: true
            required:
              - concept_id
              - percent
    strategy_inventory:
      type: object
      properties:
        supply_type:
          type: string
          enum:
            - RTB
            - RMX_API
            - T1_RMX
            - MKT
            - BATCH
        run_on_all_pmp:
          type: boolean
        run_on_all_exchanges:
          type: boolean
        site_restriction_transparent_urls:
          type: boolean
        domain_restrictions:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
        site_lists:
          type: array
          items:
            $ref: '#/components/schemas/site_list'
        campaign_site_lists:
          type: array
          items:
            $ref: '#/components/schemas/site_list'
        deals:
          type: array
          items:
            $ref: '#/components/schemas/deal'
        deal_groups:
          type: array
          items:
            $ref: '#/components/schemas/deal_group'
        supply_sources:
          type: array
          items:
            $ref: '#/components/schemas/supply_source'
      required:
        - run_on_all_pmp
        - run_on_all_exchanges
    strategy_inventory_extended:
      type: object
      properties:
        run_on_all_pmp:
          type: boolean
        run_on_all_exchanges:
          type: boolean
        site_restriction_transparent_urls:
          type: boolean
        domain_restrictions:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
        site_lists:
          type: array
          items:
            $ref: '#/components/schemas/site_list_extended'
        campaign_site_lists:
          type: array
          items:
            $ref: '#/components/schemas/site_list_extended'
        deals:
          type: array
          items:
            $ref: '#/components/schemas/deal'
        deal_groups:
          type: array
          items:
            $ref: '#/components/schemas/deal_group'
        supply_sources:
          type: array
          items:
            $ref: '#/components/schemas/supply_source_extended'
      required:
        - run_on_all_pmp
        - run_on_all_exchanges
    supply_source:
      title: ''
      type: object
      properties:
        supply_source_id:
          type: integer
      required:
        - supply_source_id
    supply_source_extended:
      title: ''
      type: object
      properties:
        supply_source_id:
          type: integer
        name:
          type: string
          description: available only when extended
          readOnly: true
        rtb_type:
          type: string
          enum:
            - STANDARD
            - MARKETPLACE
          description: available only when extended
          readOnly: true
      required:
        - supply_source_id
    site_list:
      title: site_list
      type: object
      properties:
        site_list_id:
          type: integer
        assigned:
          type: boolean
      required:
        - site_list_id
        - assigned
    site_list_extended:
      title: site_list_extended
      type: object
      properties:
        site_list_id:
          type: integer
        name:
          type: string
        status:
          type: boolean
          description: available only when extended
          readOnly: true
        restriction:
          type: string
          enum:
            - INCLUDE
            - EXCLUDE
          description: available only when extended
          readOnly: true
        sites_count:
          type: integer
          description: available only when extended
          readOnly: true
        sites_count_domain:
          type: integer
          description: available only when extended
          readOnly: true
        sites_count_app:
          type: integer
          description: available only when extended
          readOnly: true
        content_updated_on:
          type: string
          format: date-time
          description: available only when extended
          readOnly: true
        assigned:
          type: boolean
          readOnly: true
      required:
        - site_list_id
        - assigned
    deal:
      title: ''
      type: object
      properties:
        deal_id:
          type: integer
      required:
        - deal_id
    deal_group:
      title: ''
      type: object
      properties:
        deal_group_id:
          type: integer
      required:
        - deal_group_id
    strategy_targeting:
      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'
                exclude:
                  type: object
                  properties:
                    operator:
                      type: string
                      enum:
                        - AND
                        - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_audience_segment'
            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'
                exclude:
                  type: object
                  properties:
                    code:
                      type: string
                    operator:
                      type: string
                      enum:
                        - AND
                        - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_contextual_segment'
                  required:
                    - segments
            postal_codes:
              $ref: '#/components/schemas/targeting_postal_codes'
            geofence:
              type: object
              properties:
                include:
                  $ref: '#/components/schemas/strategy_geofence'
                exclude:
                  $ref: '#/components/schemas/strategy_geofence'
            my_data:
              type: object
              properties:
                include:
                  $ref: '#/components/schemas/strategy_my_data'
                exclude:
                  $ref: '#/components/schemas/strategy_my_data'
            location:
              type: object
              properties:
                include:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_location'
                exclude:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_location'
            technology:
              type: object
              properties:
                include:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_technology'
                exclude:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_technology'
            ip_addresses:
              $ref: '#/components/schemas/targeting_ip_addresses'
            day_parts:
              type: array
              items:
                $ref: '#/components/schemas/day_part'
            recency:
              type: array
              items:
                type: object
                properties:
                  pixel_id:
                    type: integer
                  from_hour:
                    type: integer
                  to_hour:
                    type: integer
                required:
                  - pixel_id
                  - from_hour
                  - to_hour
            language_codes:
              type: array
              items:
                properties:
                  code:
                    type: string
                  name:
                    type: string
      title: ''
      description: ''
      type: object
    strategy_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:
                    segments:
                      type: array
                      items:
                        $ref: >-
                          #/components/schemas/strategy_audience_segment_extended
                retired:
                  type: array
                  items:
                    type: integer
                  readOnly: true
            contextual:
              type: object
              properties:
                include:
                  type: array
                  items:
                    type: object
                    properties:
                      operator:
                        type: string
                        enum:
                          - AND
                          - OR
                      segments:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/strategy_contextual_segment_extended
                exclude:
                  type: object
                  properties:
                    segments:
                      type: array
                      items:
                        $ref: >-
                          #/components/schemas/strategy_contextual_segment_extended
                  required:
                    - segments
                retired:
                  type: array
                  items:
                    type: integer
                    readOnly: true
            postal_codes:
              $ref: '#/components/schemas/targeting_postal_codes'
            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'
            day_parts:
              type: array
              items:
                $ref: '#/components/schemas/day_part'
            recency:
              type: array
              items:
                type: object
                properties:
                  pixel_id:
                    type: integer
                  from_hour:
                    type: integer
                  to_hour:
                    type: integer
                required:
                  - to_hour
            language_codes:
              type: array
              items:
                type: string
                maxLength: 2
      title: ''
      description: ''
      type: object
    strategy_technology:
      type: object
      title: ''
      properties:
        operator:
          type: string
        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
      required:
        - code
        - target_value_id
    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_my_data:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
        pixels:
          type: array
          items:
            type: object
            properties:
              pixel_id:
                type: integer
            required:
              - pixel_id
      required:
        - pixels
    strategy_my_data_extended:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
            - AND
            - 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_geofence:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
        segments:
          type: array
          items:
            type: object
            minProperties: 1
            properties:
              geofence_segment_id:
                type: integer
    strategy_geofence_extended:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
            - AND
            - 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
    strategy_location:
      title: ''
      type: object
      properties:
        operator:
          type: string
        target_value_id:
          type: integer
        code:
          type: string
          enum:
            - DMAX
            - REGN
            - CITY
            - COUNTRY
      required:
        - target_value_id
        - code
    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
        target_value:
          type: integer
          description: available only when extended
      required:
        - target_value_id
    strategy_audience_segment:
      type: object
      title: ''
      properties:
        audience_segment_id:
          type: integer
        user_cpm:
          type: number
          format: float
          nullable: true
          description: >-
            user cpm is stored in the currency of the campaign and will not
            fluctuate will daily exchange rates.
      required:
        - audience_segment_id
    strategy_audience_segment_extended:
      type: object
      title: ''
      properties:
        audience_segment_id:
          type: integer
        audience_segment_name:
          type: string
          description: available only when extended
          readOnly: true
        cpm:
          type: number
          readOnly: true
          description: available only when extended
        user_cpm:
          type: number
          readOnly: true
          description: available only when extended
        currency_code:
          type: string
          readOnly: true
          description: available only when extended
        full_path:
          type: string
          description: available only when extended
          readOnly: true
        size:
          type: integer
          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
        code:
          type: string
          description: available only when extended
          readOnly: true
      required:
        - audience_segment_id
    strategy_contextual_segment:
      title: ''
      type: object
      properties:
        targeting_segment_id:
          type: integer
        user_cpm:
          type: number
          format: float
          nullable: true
          description: >-
            user cpm is stored in the currency of the campaign and will not
            fluctuate will daily exchange rates.
      required:
        - targeting_segment_id
    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
    atomic_creative_create:
      title: atomic_creative_create
      type: object
      description: ''
      properties:
        width:
          type: integer
        name:
          type: string
          minLength: 1
          maxLength: 256
        height:
          type: integer
        creative_import_file_id:
          type: integer
        file_type:
          type: string
          enum:
            - swf
            - gif
            - html5
            - jpg
            - jpeg
            - tiff
            - tif
            - png
            - unknown
            - vast
          default: unknown
        is_multi_creative:
          type: boolean
          default: false
        has_sound:
          type: boolean
          default: false
        rich_media:
          type: boolean
          default: false
        rich_media_provider:
          type: string
        built:
          type: boolean
          default: false
        build_date:
          type: string
        built_by_user_id:
          type: integer
          readOnly: true
        build_errors:
          type: string
        external_identifier:
          type: string
          minLength: 1
          maxLength: 64
        expand:
          type: string
        expansion_trigger:
          type: string
          enum:
            - AUTOMATIC
            - MOUSEOVER
            - CLICK
          default: MOUSEOVER
        tpas_ad_tag:
          type: string
        edited_tag:
          type: string
        click_through_url:
          type: string
          maxLength: 2048
          format: uri
          nullable: true
        concept_id:
          type: integer
          nullable: true
        status:
          type: boolean
          default: true
        is_mraid:
          type: boolean
          default: false
        is_https:
          type: boolean
          default: false
        t1as:
          type: boolean
          default: false
        start_date:
          type: string
          nullable: true
        end_date:
          type: string
          nullable: true
        vast_version:
          type: integer
          nullable: true
        is_audio:
          type: boolean
          nullable: true
        expansion_direction:
          type: string
          maxLength: 19
          default: NONRESTRICTED
        media_type:
          type: string
          enum:
            - display
            - video
            - mobile
          default: display
        ad_server_type:
          type: string
        ad_format:
          type: string
          enum:
            - DISPLAY
            - MOBILE
            - EXPANDABLE
            - FBX
            - COMPONENT
          default: DISPLAY
        approval_status:
          type: string
          enum:
            - PENDING
            - APPROVED
            - REJECTED
          default: PENDING
        tpas_ad_tag_name:
          type: string
          minLength: 1
          maxLength: 255
        click_url:
          format: uri
          type: string
          nullable: true
        sizmek_tag_status:
          type: string
          default: NOT_USED
        sizmek_creative_status:
          type: string
          default: NOT_USED
        advertiser_id:
          type: integer
          minimum: 1
        tag:
          type: string
        tag_type:
          type: string
          enum:
            - IFRAME_SCRIPT_NOSCRIPT
            - IFRAME_SCRIPT
            - IFRAME_NOSCRIPT
            - IFRAME_IMG
            - SCRIPT_NOSCRIPT
            - SCRIPT
            - NOSCRIPT
            - IFRAME
            - IMG
            - VIDEO
      required:
        - width
        - height
        - external_identifier
        - advertiser_id
    atomic_creative_update:
      title: atomic_creative_update
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
        version:
          type: integer
        external_identifier:
          type: string
          minLength: 1
          maxLength: 64
        advertiser_id:
          type: integer
          minimum: 1
        width:
          type: integer
        height:
          type: integer
        concept_id:
          type: integer
          nullable: true
        status:
          type: boolean
        is_mraid:
          type: boolean
        is_https:
          type: boolean
        t1as:
          type: boolean
        start_date:
          type: string
          nullable: true
        end_date:
          type: string
          nullable: true
        vast_version:
          type: integer
          nullable: true
        is_audio:
          type: boolean
          nullable: true
        expansion_direction:
          type: string
          maxLength: 19
          default: NONRESTRICTED
        expansion_trigger:
          type: string
          enum:
            - AUTOMATIC
            - MOUSEOVER
            - CLICK
          default: MOUSEOVER
        media_type:
          type: string
          enum:
            - display
            - video
            - mobile
        ad_server_type:
          type: string
        ad_format:
          type: string
          enum:
            - DISPLAY
            - MOBILE
            - EXPANDABLE
            - FBX
            - COMPONENT
          default: DISPLAY
        approval_status:
          type: string
          enum:
            - PENDING
            - APPROVED
            - REJECTED
        tpas_ad_tag:
          type: string
        tpas_ad_tag_name:
          type: string
          minLength: 1
          maxLength: 255
        click_through_url:
          type: string
          maxLength: 2048
          format: uri
          nullable: true
        click_url:
          format: uri
          type: string
          nullable: true
        edited_tag:
          type: string
        tag:
          type: string
        built_by_user_id:
          type: integer
          readOnly: true
        tag_type:
          type: string
          enum:
            - IFRAME_SCRIPT_NOSCRIPT
            - IFRAME_SCRIPT
            - IFRAME_NOSCRIPT
            - IFRAME_IMG
            - SCRIPT_NOSCRIPT
            - SCRIPT
            - NOSCRIPT
            - IFRAME
            - IMG
            - VIDEO
    atomic_creative_creative:
      title: atomic_creative_creative
      type: object
      properties:
        tag:
          type: string
        tag_type:
          type: string
          enum:
            - IFRAME_SCRIPT_NOSCRIPT
            - IFRAME_SCRIPT
            - IFRAME_NOSCRIPT
            - IFRAME_IMG
            - SCRIPT_NOSCRIPT
            - SCRIPT
            - NOSCRIPT
            - IFRAME
            - IMG
            - VIDEO
    atomic_creative_vendor:
      title: atomic_creative_vendor
      type: object
      properties:
        vendor_ids:
          type: array
          items:
            type: integer
    atomic_creative_response:
      title: atomic_creative_response
      type: object
      properties:
        id:
          type: integer
        version:
          type: integer
        entity_type:
          type: string
        advertiser_id:
          type: integer
        concept_id:
          type: integer
        concept_name:
          type: string
        name:
          type: string
        width:
          type: integer
        height:
          type: integer
        creative_import_file_id:
          type: integer
        file_type:
          type: string
        is_https:
          type: boolean
        is_multi_creative:
          type: boolean
        has_sound:
          type: boolean
        rich_media:
          type: boolean
        rich_media_provider:
          type: string
        status:
          type: boolean
        built:
          type: boolean
        build_date:
          type: string
        built_by_user_id:
          type: integer
          nullable: true
        build_errors:
          type: string
        created_on:
          type: string
          format: date-time
          readOnly: true
        last_modified:
          type: string
        external_identifier:
          type: string
        tpas_ad_tag_name:
          type: string
        updated_on:
          type: string
          format: date-time
          readOnly: true
        expand:
          type: string
        click_url:
          type: string
        ad_format:
          type: string
        expansion_direction:
          type: string
          maxLength: 19
          default: NONRESTRICTED
        expansion_trigger:
          type: string
          enum:
            - AUTOMATIC
            - MOUSEOVER
            - CLICK
          default: MOUSEOVER
        ad_server_type:
          type: string
        t1as:
          type: boolean
        tpas_ad_tag:
          type: string
        edited_tag:
          type: string
        click_through_url:
          type: string
        rejected_reason:
          type: string
        approval_status:
          type: string
        start_date:
          type: string
        end_date:
          type: string
        media_type:
          type: string
        is_mraid:
          type: boolean
        vast_version:
          type: integer
        sizmek_tag_status:
          type: string
        sizmek_creative_status:
          type: string
        last_payload_modified:
          type: string
        is_audio:
          type: boolean
        tag:
          type: string
        tag_type:
          type: string
        targeted_strategies:
          type: object
          properties:
            count:
              type: integer
            strategies_list:
              type: array
              items:
                type: integer
                format: int32
        atomic_creative_ssl_validators:
          type: object
          properties:
            is_https:
              type: string
            notify_state:
              type: string
            ignored:
              type: string
            ksize:
              type: integer
        vendors:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              adx_approved:
                type: boolean
              adx_declaration_required:
                type: boolean
              mm_contract_available:
                type: boolean
              is_eligible:
                type: boolean
              adx_ssl_approved:
                type: boolean
              adx_video_ssl_approved:
                type: boolean
              adx_video_approved:
                type: boolean
              auto_tag_display:
                type: boolean
              set_by:
                type: string
        creative_assets:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              version:
                type: integer
              creative_id:
                type: integer
              primary_asset_id:
                type: integer
              created_on:
                type: string
                format: date-time
                readOnly: true
              updated_on:
                type: string
                format: date-time
                readOnly: true
              file_name:
                type: string
              file_role:
                type: string
              file_type:
                type: string
              file_storage_path:
                type: string
              file_size:
                type: integer
              media_version:
                type: number
                format: float
              width:
                type: integer
              height:
                type: integer
              note:
                type: string
      required:
        - id
        - version
        - entity_type
        - advertiser_id
        - name
        - width
        - height
        - file_type
        - is_https
        - is_multi_creative
        - has_sound
        - rich_media
        - built
        - created_on
        - last_modified
        - external_identifier
        - tpas_ad_tag_name
        - updated_on
        - ad_format
        - expansion_trigger
        - expansion_direction
        - t1as
        - approval_status
        - media_type
        - is_mraid
        - sizmek_tag_status
        - sizmek_creative_status
    currency_rate_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            date:
              type: string
              format: date-time
            currency_code:
              type: string
              maxLength: 3
            rate:
              type: number
              format: float
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    ad_server_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            name:
              type: string
              maxLength: 64
    site_list_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            status:
              type: boolean
            organization_id:
              type: integer
            name:
              type: string
              maxLength: 64
            restriction:
              type: string
              enum:
                - INCLUDE
                - EXCLUDE
            filename:
              type: string
              maxLength: 255
              nullable: true
            content_updated_on:
              type: string
              format: date-time
              readOnly: true
            sites_count:
              type: integer
              nullable: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    timezone_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            date:
              type: string
              format: date-time
            description:
              type: string
              nullable: true
              maxLength: 256
            display_name:
              type: string
              maxLength: 64
            zone_name:
              type: string
              maxLength: 64
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    strategy_deal_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            strategy_id:
              type: integer
            deal_id:
              type: integer
    strategy_day_part_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            strategy_id:
              type: integer
            user_time:
              type: boolean
              default: true
            status:
              type: boolean
              nullable: true
            start_hour:
              type: integer
            end_hour:
              type: integer
            days:
              type: string
              maxLength: 7
              default: MTWRFSU
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    strategy_group_full:
      allOf:
        - type: object
          properties:
            group:
              type: array
              items:
                type: string
    strategy_group_full_extended:
      allOf:
        - type: object
          properties:
            count:
              type: integer
            strategy_ids:
              type: array
              items:
                type: integer
                format: int32
            name:
              type: string
    strategy_ip_address_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            strategy_id:
              type: integer
            target_inet:
              type: array
              items:
                type: string
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    strategy_concept_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            strategy_id:
              type: integer
            concept_id:
              type: integer
            status:
              type: boolean
            weighting:
              type: string
              enum:
                - BUDGET
                - IMPRESSION
                - NONE
              default: NONE
            percent:
              type: number
              format: float
              nullable: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    targeting_segment_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            targeting_vendor_id:
              type: integer
            parent_targeting_segment_id:
              type: integer
              nullable: true
            objective_id:
              type: integer
              nullable: true
            name:
              type: string
              maxLength: 256
            uniques:
              type: integer
              nullable: true
            external_code:
              type: string
              maxLength: 48
              nullable: true
            wholesale_cpm:
              type: number
              format: double
              nullable: true
            retail_cpm:
              type: number
              format: double
              nullable: true
            buyable:
              type: boolean
              default: true
            tag:
              type: string
              maxLength: 64
            full_path:
              type: string
            child_count:
              type: integer
              nullable: true
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    strategy_target_value_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            strategy_target:
              $ref: '#/components/schemas/strategy_target_full'
            target_value:
              type: array
              items:
                $ref: '#/components/schemas/target_value_full'
    strategy_target_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            strategy_id:
              type: integer
            target_dimension_id:
              type: integer
            exclude:
              type: boolean
              default: false
            active:
              type: boolean
              default: true
            target_op:
              type: string
              enum:
                - AND
                - OR
    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
    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_plan_target_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            strategy_plan_id:
              type: integer
            target_dimension_id:
              type: integer
            exclude:
              type: boolean
              default: false
            active:
              type: boolean
              default: true
            target_op:
              type: string
              enum:
                - AND
                - OR
    advertiser_collection:
      title: advertiser_collection
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              entity_type:
                type: string
              agency:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  entity_type:
                    type: string
                  rel:
                    type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    advertiser_collection_full:
      title: advertiser_collection_full
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/advertiser_base'
            - type: object
              properties:
                id:
                  type: integer
                ad_server_fee:
                  type: number
                agency_id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
                effective_ads_txt_verified:
                  type: string
                agency:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    entity_type:
                      type: string
                    rel:
                      type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    agency_collection:
      title: agency_collection
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              entity_type:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    agency_collection_full:
      title: agency_collection_full
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/agency_base'
            - type: object
              properties:
                id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                organization_id:
                  type: integer
                  minimum: 1
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
                organization:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    entity_type:
                      type: string
                    rel:
                      type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    agency_create_response:
      title: agency_create_response
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/agency_base'
            - type: object
              properties:
                id:
                  type: integer
                created_on:
                  type: string
                  format: date-time
                  readOnly: true
                entity_type:
                  type: string
                organization_id:
                  type: integer
                  minimum: 1
                updated_on:
                  type: string
                  format: date-time
                  readOnly: true
                version:
                  type: integer
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    pixel_bundle_collection:
      title: pixel_bundle_collection
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              entity_type:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    pixel_bundle_collection_full:
      title: pixel_bundle_collection
      type: object
      properties:
        data:
          $ref: '#/components/schemas/pixel_bundle_base'
        meta:
          $ref: '#/components/schemas/list_metadata'
    organization_collection:
      title: organization_collection
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              entity_type:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    organization_update:
      title: organization_update
      type: object
      required:
        - name
        - status
        - mm_contact_name
        - adx_seat_account_id
        - connected_id_type
        - contact_name
        - address_1
        - city
        - state
        - zip
        - country
        - phone
        - currency_code
        - billing_country_code
        - dmp_enabled
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
        org_type:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - buyer
              - partner
        status:
          type: boolean
        website:
          type: string
          maxLength: 512
          nullable: true
        facebook:
          type: string
          maxLength: 512
          nullable: true
        linkedin:
          type: string
          maxLength: 512
          nullable: true
        twitter:
          type: string
          maxLength: 512
          nullable: true
        allow_x_agency_pixels:
          type: boolean
        allow_byo_price:
          type: boolean
        opt_out_connected_id:
          type: boolean
        opt_out_connected_id_mathid:
          type: boolean
        override_suspicious_traffic_filter:
          type: boolean
        restrict_targeting_to_same_device_id:
          type: boolean
        restrict_targeting_to_deterministic_id:
          type: boolean
        suspicious_traffic_filter_level:
          type: integer
          minimum: 0
          maximum: 100
        use_ads_txt:
          type: boolean
        use_evidon_opt_out:
          type: boolean
          nullable: true
        eligible_for_data_sharing:
          type: boolean
        holding_org_id:
          type: integer
          nullable: true
        service_provider_ccpa:
          type: boolean
        mm_contact_name:
          type: string
          maxLength: 64
        adx_seat_account_id:
          type: integer
          minimum: 1
        connected_id_type:
          type: string
          enum:
            - DETERMINISTIC_FIRST
        contact_name:
          type: string
          maxLength: 64
        address_1:
          type: string
          maxLength: 256
        address_2:
          type: string
          maxLength: 256
          nullable: true
        city:
          type: string
          maxLength: 32
        state:
          type: string
          maxLength: 2
        zip:
          type: string
          maxLength: 10
        country:
          type: string
          maxLength: 2
        phone:
          type: string
          maxLength: 24
        currency_code:
          type: string
          maxLength: 3
        billing_country_code:
          type: string
        dmp_enabled:
          type: string
          enum:
            - enabled
            - disabled
        terminated:
          type: boolean
        version:
          type: integer
        tag_ruleset:
          type: string
          maxLength: 64
          nullable: true
    permission_flags:
      type: object
      properties:
        create:
          type: boolean
        read:
          type: boolean
        update:
          type: boolean
        delete:
          type: boolean
        inherited_from:
          type: string
    permission_organization:
      allOf:
        - type: object
          properties:
            organization_id:
              type: integer
        - $ref: '#/components/schemas/permission_flags'
    settings_organization:
      type: object
      properties:
        settings:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                example: attribute3
              value:
                type: string
                example: value3
        entity:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            settings_total:
              type: integer
            type:
              type: string
    campaign_plan_update:
      type: object
      properties:
        version:
          type: integer
    campaign_plan_create:
      type: object
      properties:
        advertiser_id:
          type: integer
    campaign_plan_common:
      type: object
      properties:
        name:
          type: string
        version:
          type: integer
        duration:
          type: object
          properties:
            start_date:
              type: string
              format: date-time
            end_date:
              type: string
              format: date-time
        budget:
          type: object
          properties:
            total_budget:
              type: number
              format: float
              minimum: 1
              maximum: 99999999999999.98
            currency_code:
              type: string
        zone_name:
          type: string
    campaign_plan:
      type: object
      allOf:
        - $ref: '#/components/schemas/campaign_plan_update'
        - $ref: '#/components/schemas/campaign_plan_create'
        - $ref: '#/components/schemas/campaign_plan_common'
    strategy_plan_details:
      type: object
      properties:
        name:
          type: string
          maxLength: 128
        feature_compatibility:
          type: string
          maxLength: 1024
        device_graph_only:
          type: boolean
    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_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 foreign currency.
          nullable: true
        currency_code:
          type: string
    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
        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
    strategy_plan_frequency:
      type: object
      additionalProperties: false
      properties:
        frequency_type:
          type: string
          enum:
            - even
            - asap
            - no-limit
            - t1-optimized
        frequency_interval:
          type: string
          enum:
            - hour
            - day
            - week
            - month
            - campaign
            - not-applicable
        frequency_amount:
          type: integer
        frequency_optimization:
          type: boolean
    strategy_plan_inventory:
      type: object
      properties:
        run_on_all_pmp:
          type: boolean
        run_on_all_exchanges:
          type: boolean
        site_restriction_transparent_urls:
          type: boolean
        domain_restrictions:
          type: object
          properties:
            include:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
            exclude:
              type: array
              items:
                $ref: '#/components/schemas/domain_restriction'
        site_lists:
          type: array
          items:
            $ref: '#/components/schemas/site_list'
        deals:
          type: array
          items:
            $ref: '#/components/schemas/deal'
        deal_groups:
          type: array
          items:
            $ref: '#/components/schemas/deal_group'
        supply_sources:
          type: array
          items:
            $ref: '#/components/schemas/supply_source'
      required:
        - run_on_all_pmp
        - run_on_all_exchanges
    strategy_plan_targeting:
      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'
                exclude:
                  type: object
                  properties:
                    operator:
                      type: string
                      enum:
                        - AND
                        - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_audience_segment'
            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'
                exclude:
                  type: object
                  properties:
                    code:
                      type: string
                    operator:
                      type: string
                      enum:
                        - AND
                        - OR
                    segments:
                      type: array
                      items:
                        $ref: '#/components/schemas/strategy_contextual_segment'
                  required:
                    - segments
            postal_codes:
              $ref: '#/components/schemas/targeting_postal_codes'
            geofence:
              type: object
              properties:
                include:
                  $ref: '#/components/schemas/strategy_geofence'
                exclude:
                  $ref: '#/components/schemas/strategy_geofence'
            my_data:
              type: object
              properties:
                include:
                  $ref: '#/components/schemas/strategy_my_data'
                exclude:
                  $ref: '#/components/schemas/strategy_my_data'
            location:
              type: object
              properties:
                include:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_location'
                exclude:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_location'
            technology:
              type: object
              properties:
                include:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_technology'
                exclude:
                  type: array
                  items:
                    $ref: '#/components/schemas/strategy_technology'
            ip_addresses:
              $ref: '#/components/schemas/targeting_ip_addresses'
            day_parts:
              type: array
              items:
                $ref: '#/components/schemas/day_part'
            recency:
              type: array
              items:
                type: object
                properties:
                  pixel_id:
                    type: integer
                  from_hour:
                    type: integer
                  to_hour:
                    type: integer
                required:
                  - pixel_id
                  - from_hour
                  - to_hour
            language_codes:
              type: array
              items:
                properties:
                  code:
                    type: string
                  name:
                    type: string
      title: ''
      description: ''
      type: object
    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:
      allOf:
        - $ref: '#/components/schemas/strategy_plan_details'
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            campaign_id:
              type: integer
            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_target_value_collection:
      type: object
      title: strategy_plan_target_value_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_plan_target_value_collection_full:
      type: object
      title: strategy_plan_target_value_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_plan_target_value_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_collection:
      type: object
      title: strategy_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_collection_full:
      type: object
      title: strategy_collection_full
      properties:
        data:
          type: array
          items:
            allOf:
              - type: object
                properties:
                  campaign_name:
                    type: string
                  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
                  campaign_service_type:
                    type: string
                  campaign_goal_type:
                    type: string
                  campaign_goal_value:
                    type: number
                    format: float
                  viewability:
                    type: object
                    properties:
                      type:
                        type: string
                        example: AUTO_TAG
                      vendor_id:
                        type: integer
                      sample_rate:
                        type: number
                        format: float
              - $ref: '#/components/schemas/strategy_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_collection_full_extended:
      type: object
      title: strategy_collection_full_extended
      properties:
        data:
          type: array
          items:
            allOf:
              - type: object
                properties:
                  campaign_name:
                    type: string
                  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
                  campaign_service_type:
                    type: string
              - $ref: '#/components/schemas/strategy_full_extended'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy:
      type: object
      properties:
        data:
          allOf:
            - type: object
              properties:
                campaign_name:
                  type: string
                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
                campaign_service_type:
                  type: string
            - $ref: '#/components/schemas/strategy_full'
        meta:
          type: object
          properties:
            status:
              type: string
              example: success
    strategy_extended:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/strategy_full_extended'
        meta:
          type: object
          properties:
            status:
              type: string
    targeting_friendly_name:
      type: object
      properties:
        friendly_name:
          type: string
        vendor_id:
          type: integer
        vendor_name:
          type: string
        target_id:
          type: string
        dimension_id:
          type: integer
          format: int32
        dimension_code:
          type: string
        tuple:
          type: string
    campaign_site_list:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        version:
          type: integer
        status:
          type: boolean
        organization_id:
          type: integer
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
        restriction:
          type: string
        filename:
          type: string
        campaign_id:
          type: integer
        assigned:
          type: boolean
        sites_count:
          type: integer
        sites_count_app:
          type: integer
        sites_count_domain:
          type: integer
    campaign_budget_flight:
      type: object
      properties:
        id:
          type: integer
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        total_budget:
          type: number
        total_impression_budget:
          nullable: true
          type: number
        is_relevant:
          type: boolean
    budget_flight_full:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        version:
          type: integer
        campaign_id:
          type: integer
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        total_budget:
          type: number
          format: float
        is_relevant:
          type: boolean
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
        zone_name:
          type: string
        currency_code:
          type: string
        total_impression_budget:
          type: integer
          nullable: true
    campaign_custom_brain_selection:
      description: ''
      type: object
      properties:
        id:
          type: integer
        version:
          type: integer
        campaign_id:
          type: integer
        selection_id:
          type: integer
        selection_type:
          type: string
        active:
          type: boolean
        enable_mm_audiences_in_brain:
          type: boolean
        buyable:
          type: boolean
        is_retired:
          type: boolean
        full_path:
          type: string
        owner_name:
          type: string
        selection_name:
          type: string
        refer_url:
          type: string
        child_count:
          type: integer
        load_count:
          type: integer
        parent_audience_segment_id:
          type: integer
        retail_cpm:
          type: number
          format: float
        uniques:
          type: integer
        wholesale_cpm:
          type: number
          format: float
    campaign_update:
      type: object
      allOf:
        - $ref: '#/components/schemas/campaign_details'
        - type: object
          required:
            - name
            - service_type
            - budget
          properties:
            advertiser_id:
              type: integer
              minimum: 1
            identity:
              $ref: '#/components/schemas/campaign_identity'
            ad_server:
              $ref: '#/components/schemas/campaign_ad_server'
            goals:
              $ref: '#/components/schemas/campaign_goals'
            budget:
              allOf:
                - $ref: '#/components/schemas/campaign_budget'
                - required:
                    - currency_code
                    - margin_pct
                    - flights
                  properties:
                    flights:
                      type: array
                      minItems: 1
                      items:
                        $ref: '#/components/schemas/campaign_budget_flights'
            frequency:
              $ref: '#/components/schemas/campaign_frequency'
            pacing:
              $ref: '#/components/schemas/campaign_pacing'
            inventory:
              $ref: '#/components/schemas/campaign_inventory'
            attribution:
              $ref: '#/components/schemas/campaign_attribution'
            viewability:
              $ref: '#/components/schemas/campaign_viewability'
            vendor_contracts:
              type: array
              items:
                $ref: '#/components/schemas/vendor_contract'
            site_lists:
              type: array
              items:
                type: object
                required:
                  - id
                  - assigned
                properties:
                  id:
                    type: integer
                  assigned:
                    type: boolean
            custom_brain_selections:
              type: array
              items:
                type: object
                properties:
                  selection_id:
                    type: integer
                  selection_type:
                    enum:
                      - Audience Target
                      - Data Pixel
                      - Event Pixel
                      - Segment
                      - Dynamic
    campaign_collection:
      type: object
      title: campaign_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    campaign_collection_full:
      type: object
      title: campaign_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/campaign_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    campaign_goals_create:
      type: object
      required:
        - goal_type
      properties:
        goal_type:
          type: string
          enum:
            - spend
            - reach
            - cpc
            - cpe
            - cpa
            - roi
            - ctr
            - vcr
            - viewability_rate
            - vcpm
            - cpcv
        goal_alert:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
        goal_value:
          type: number
          format: float
          minimum: 0.0001
          maximum: 9999999.9999
        goal_category:
          type: string
          enum:
            - audience
            - engagement
            - response
          nullable: true
    create_campaign_viewability:
      type: object
      nullable: true
      required:
        - vendor_id
        - sample_rate
        - type
      properties:
        vendor_id:
          type: integer
        type:
          type: string
          enum:
            - AUTO_TAG
            - BYOV
        sample_rate:
          type: number
          format: float
          minimum: 0
          maximum: 1
    budget_flight_collection:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    budget_flight_collection_full:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/budget_flight_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    campaign_dba_collection:
      type: object
      title: campaign_dba_collection
      properties:
        data:
          type: object
          properties:
            id:
              type: integer
            entity_type:
              type: string
            name:
              type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    campaign_dba_collection_full:
      type: object
      title: campaign_dba_collection_full
      properties:
        data:
          $ref: '#/components/schemas/campaign_full'
        meta:
          $ref: '#/components/schemas/single_metadata'
    dba:
      description: ''
      type: array
      items:
        type: object
        properties:
          id:
            type: integer
            description: campaign id
          dynamic_budget_allocation_applied:
            type: string
            format: date-time
            nullable: true
          dynamic_budget_allocation_available:
            type: string
            format: date-time
            nullable: true
        required:
          - id
    user_permission:
      title: user permission
      type: object
      properties:
        id:
          type: integer
        create:
          type: boolean
        read:
          type: boolean
        update:
          type: boolean
        delete:
          type: boolean
    user_permissions:
      title: user permissions
      description: available only when extended
      nullable: true
      type: object
      properties:
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/user_permission'
        agencies:
          type: array
          items:
            $ref: '#/components/schemas/user_permission'
        advertisers:
          type: array
          items:
            $ref: '#/components/schemas/user_permission'
    permission_agency:
      allOf:
        - $ref: '#/components/schemas/permission_flags'
        - type: object
          properties:
            agency_id:
              type: integer
    permission_advertiser:
      allOf:
        - $ref: '#/components/schemas/permission_flags'
        - type: object
          properties:
            advertiser_id:
              type: integer
    permission:
      type: object
      properties:
        id:
          type: integer
        create:
          type: boolean
        read:
          type: boolean
        update:
          type: boolean
        delete:
          type: boolean
        propogate:
          type: boolean
    permission_user_output:
      type: object
      properties:
        id:
          type: integer
        entity_type:
          type: string
        username:
          type: string
        active:
          type: boolean
        version:
          type: integer
        title:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        link_ldap:
          type: boolean
        link_saml:
          type: boolean
        phone:
          type: string
        mobile:
          type: string
        fax:
          type: string
        type:
          type: string
        role:
          type: string
        scope:
          type: string
        view_organizations:
          type: boolean
        edit_campaigns:
          type: boolean
        edit_margins_and_performance:
          type: boolean
        labs_enable_rmx:
          type: boolean
        creator_id:
          type: integer
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
        last_login_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        access_internal_fees:
          type: boolean
        view_segments:
          type: boolean
        edit_segments:
          type: boolean
        view_data_definition:
          type: boolean
        edit_data_definition:
          type: boolean
        view_dmp_reports:
          type: boolean
        email:
          type: string
        permissions:
          type: object
          properties:
            organizations:
              type: array
              items:
                $ref: '#/components/schemas/permission'
            agencies:
              type: array
              items:
                $ref: '#/components/schemas/permission'
            advertisers:
              type: array
              items:
                $ref: '#/components/schemas/permission'
        roles:
          type: array
          items:
            type: integer
        language:
          type: string
        zone_name:
          type: string
    permission_campaign:
      allOf:
        - type: object
          properties:
            campaign_id:
              type: integer
            permission:
              $ref: '#/components/schemas/permission_flags'
        - $ref: '#/components/schemas/permission_user_output'
    permission_strategy:
      allOf:
        - type: object
          properties:
            strategy_id:
              type: integer
            permission:
              $ref: '#/components/schemas/permission_flags'
        - $ref: '#/components/schemas/permission_user_output'
    permission_list:
      type: object
      properties:
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/permission_organization'
        agencies:
          type: array
          items:
            $ref: '#/components/schemas/permission_agency'
        advertisers:
          type: array
          items:
            $ref: '#/components/schemas/permission_advertiser'
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/permission_campaign'
        strategies:
          type: array
          items:
            $ref: '#/components/schemas/permission_strategy'
    permission_v2_flags:
      type: object
      properties:
        type:
          type: string
        role:
          type: string
        scope:
          type: string
        view_segments:
          type: boolean
        view_organizations:
          type: boolean
        edit_margins_and_performance:
          type: boolean
        access_internal_fees:
          type: boolean
        edit_segments:
          type: boolean
        edit_campaigns:
          type: boolean
        view_data_definition:
          type: boolean
        view_dmp_reports:
          type: boolean
        edit_data_definition:
          type: boolean
    permission_v2_organization:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            name:
              type: string
            dmp_enabled:
              type: string
            full_access:
              type: boolean
    permission_v2_agency:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            name:
              type: string
            dmp_enabled:
              type: string
            full_access:
              type: boolean
            organization_id:
              type: integer
    permission_v2_advertiser:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            name:
              type: string
            dmp_enabled:
              type: string
            agency_id:
              type: integer
    permission_v2_object:
      type: object
      properties:
        flags:
          type: object
          $ref: '#/components/schemas/permission_v2_flags'
        entities:
          type: object
          properties:
            organizations:
              type: array
              items:
                $ref: '#/components/schemas/permission_v2_organization'
            agencies:
              type: array
              items:
                $ref: '#/components/schemas/permission_v2_agency'
            advertisers:
              type: array
              items:
                $ref: '#/components/schemas/permission_v2_advertiser'
    concept_create:
      type: object
      description: ''
      properties:
        version:
          type: integer
      required:
        - advertiser_id
    concept_common:
      type: object
      description: ''
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
        status:
          type: boolean
      required:
        - name
    concept_update:
      type: object
      description: ''
      properties:
        version:
          type: integer
      required:
        - version
    concept_response:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
            entity_type:
              type: string
            atomic_creative_list:
              type: array
              items:
                type: integer
                format: int32
        - $ref: '#/components/schemas/concept_update'
        - $ref: '#/components/schemas/concept_common'
    bulk_errors:
      title: bulk errors
      type: array
      items:
        type: object
        properties:
          id:
            type: integer
          action:
            type: string
          entity_type:
            type: string
          index:
            type: integer
          errors:
            type: array
            items:
              type: object
              properties:
                id:
                  type: integer
                code:
                  type: string
                field:
                  type: string
                message:
                  type: string
    search_result:
      type: object
      properties:
        id:
          type: integer
        entity_type:
          type: string
        name:
          type: string
    supply_source_response:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            name:
              type: string
            supply_type:
              type: string
            status:
              type: boolean
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
            rtb_enabled:
              type: boolean
            mm_safe:
              type: boolean
            pixel_tag:
              type: string
            distribute:
              type: boolean
            use_pool:
              type: boolean
            code:
              type: string
            is_proservice:
              type: boolean
            default_seat_identifier:
              type: string
            seat_enabled:
              type: boolean
            bidder_exchange_identifier:
              type: integer
            pmp_enabled:
              type: boolean
            rtb_type:
              type: string
            parent_supply_id:
              type: integer
            has_display:
              type: boolean
            has_mobile_display:
              type: boolean
            has_video:
              type: boolean
            has_mobile_video:
              type: boolean
            requires_creative_audit:
              type: boolean
            has_desktop_video:
              type: boolean
            has_connected_tv:
              type: boolean
            attribution_group:
              type: string
            fraud_filter:
              type: boolean
            mma_free:
              type: boolean
            private:
              type: boolean
    vendor_collection:
      type: object
      title: vendor_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    vendor_base:
      title: vendor
      type: object
      properties:
        id:
          type: integer
        version:
          type: integer
        name:
          type: string
        adx_approved:
          type: boolean
        adx_declaration_required:
          type: boolean
        adx_vendor_identifier:
          type: string
          maxLength: 16
        mm_contract_available:
          type: boolean
        rate_card_price:
          type: number
          format: double
          maximum: 999999999.9999
        rate_card_type:
          type: string
          enum:
            - CPM
            - FIXED
        wholesale_price:
          type: number
          format: double
          maximum: 999999999.9999
        is_eligible:
          type: boolean
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        description:
          type: string
          maxLength: 4096
        vendor_type:
          type: string
          enum:
            - AD_SERVER
            - AD_VERIFICATION
            - AUDIENCE_VERIFICATION
            - CONTEXTUAL
            - DATA
            - DSP
            - DYNAMIC_CREATIVE
            - MEASUREMENT
            - NETWORK
            - OBA_COMPLIANCE
            - OTHER
            - PIXEL_TRACKING
            - RICH_MEDIA
            - SURVEY
            - VIEWABILITY
            - VIEWABILITY_BYO_DISPLAY
            - VIEWABILITY_BYO_VIDEO
        code:
          type: string
          maxLength: 64
        adx_ssl_approved:
          type: boolean
        adx_video_ssl_approved:
          type: boolean
        adx_video_approved:
          type: boolean
        auto_tag_display:
          type: boolean
        provider_tax:
          type: number
          format: double
          maximum: 999999.999999
        set_by:
          type: string
    vendor_collection_full:
      type: object
      title: vendor_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/vendor_base'
        meta:
          $ref: '#/components/schemas/list_metadata'
    currency_rate_collection:
      type: object
      title: currency_rate_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    currency_rate_collection_full:
      type: object
      title: currency_rate_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/currency_rate_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    ad_server_collection:
      type: object
      title: ad_server_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    ad_server_collection_full:
      type: object
      title: ad_server_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ad_server_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    site_list_collection:
      type: object
      title: site_list_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    site_list_collection_full:
      type: object
      title: site_list_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/site_list_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    site_list_assignment_collection:
      type: object
      title: site_list_assignment_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    site_list_assignment_full:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            site_list_id:
              type: integer
            entity_id:
              type: integer
            associated_campaign_id:
              type: integer
            collection:
              type: string
            name:
              type: string
    site_list_assignment_collection_full:
      type: object
      title: site_list_assignment_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/site_list_assignment_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    timezone_collection:
      type: object
      title: timezone_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    timezone_collection_full:
      type: object
      title: timezone_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/timezone_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    targeting_segment_collection:
      type: object
      title: targeting_segment_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    targeting_segment_collection_full:
      type: object
      title: targeting_segment_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/targeting_segment_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    targeting_segment_objective_response:
      allOf:
        - type: object
          properties:
            id:
              type: integer
            version:
              type: integer
            objective:
              type: string
            created_on:
              type: string
              format: date-time
              readOnly: true
            updated_on:
              type: string
              format: date-time
              readOnly: true
    strategy_deal_collection:
      type: object
      title: strategy_deal_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_deal_collection_full:
      type: object
      title: strategy_deal_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_deal_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_day_part_collection:
      type: object
      title: strategy_day_part_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_day_part_collection_full:
      type: object
      title: strategy_day_part_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_day_part_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_group_collection:
      type: object
      title: strategy_group_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_group_collection_full:
      type: object
      title: strategy_group_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_group_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_group_collection_full_extended:
      type: object
      title: strategy_group_collection_full_extended
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_group_full_extended'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_ip_address_collection:
      type: object
      title: strategy_ip_address_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_ip_address_collection_full:
      type: object
      title: strategy_ip_address_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_ip_address_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_concept_collection:
      type: object
      title: strategy_concept_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_concept_collection_full:
      type: object
      title: strategy_concept_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_concept_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_target_value_collection:
      type: object
      title: strategy_target_value_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_target_value_collection_full:
      type: object
      title: strategy_target_value_collection_full
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/strategy_target_value_full'
        meta:
          $ref: '#/components/schemas/list_metadata'
  parameters:
    page_limit:
      in: query
      name: page_limit
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        example: 100
      required: false
      description: Number of elements in the collection to retrieve
    page_offset:
      in: query
      name: page_offset
      schema:
        type: integer
        minimum: 0
        maximum: 1000
        example: 0
      required: false
      description: Index of the first element in the collection to retrieve
    sort_by:
      in: query
      name: sort_by
      description: >
        The field to sort by. You can use any field name in ascending or
        descending order.

        For ascending order, use the field name directly, e.g., `id`. 

        For descending order, prefix the field name with a hyphen (`-`), e.g.,
        `-id`.
      schema:
        type: string
        example: id, -id, name, -name
      required: false
    sort_order:
      in: query
      name: sort_order
      schema:
        type: string
      required: false
      description: Sorting order for the sort_by parameter for the result list
    q:
      in: query
      name: q
      schema:
        type: string
      required: false
      description: >
        Query search for filtering. This parameter can be used to filter results
        based on various fields.

        - `q=name=:{search}*` to find all results with names starting with
        "search".

        - `q=status==true` to find all active entities.

        - `q=id>=1000` to find all entities with id greater than or equal to
        1000.
    full:
      in: query
      name: full
      schema:
        type: string
        example: '*'
      required: false
      description: >
        Use this parameter to specify which properties to include in the
        response. 

        To return all fields, set the value to `*`. For example, `full=*` will
        include all properties
    extended:
      in: query
      name: extended
      schema:
        type: boolean
      required: false
      description: Get extended properties in response
    advertisers_with:
      in: query
      name: with
      schema:
        type: string
        enum:
          - agency
      required: false
      description: Get related property in response
    agencies_with:
      in: query
      name: with
      schema:
        type: string
        enum:
          - organization
      required: false
      description: Get related property in response
    strategy_with:
      in: query
      name: with
      schema:
        type: string
        enum:
          - technology
          - location
          - ip_addresses
          - geofences
          - my_data
          - audience
          - contextual
          - deals
          - site_lists
          - supply
          - domain_restrictions
          - concepts
          - day_parts
          - fold_positions
      required: false
      description: Get related property in response
    strategy_deals_with:
      in: query
      name: with
      schema:
        type: string
        enum:
          - strategy
          - campaign
          - advertiser
          - agency
      required: false
      description: Get related property in response
  requestBodies:
    audience_segment_estimate:
      $ref: '#/components/requestBodies/audience_segments_estimate_cpm_and_size'
    strategy_plan:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/strategy_plan_request'
    strategy_create:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  campaign_id:
                    type: integer
                  channels:
                    type: array
                    items:
                      type: string
                required:
                  - campaign_id
                  - duration
              - $ref: '#/components/schemas/strategy_full'
    strategy_update:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/strategy_full'
    campaign_bulk_update:
      content:
        application/json:
          schema:
            description: ''
            type: object
            properties:
              update:
                type: array
                uniqueItems: true
                minItems: 1
                items:
                  $ref: '#/components/schemas/campaign_bulk'
            required:
              - update
    budget_flight_bulk_update:
      content:
        application/json:
          schema:
            type: object
            properties:
              budget_flights:
                properties:
                  create:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/campaign_budget_flights'
                        - type: object
                          required:
                            - campaign_id
                          properties:
                            campaign_id:
                              type: integer
                  update:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/campaign_budget_flights'
                        - type: object
                          required:
                            - id
                          properties:
                            id:
                              type: integer
                              minimum: 1
                  delete:
                    type: array
                    items:
                      type: integer
    campaign:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaign_create'
    contextual_segment_estimate:
      content:
        application/json:
          schema:
            title: Contextual Segment Estimate Request
            type: object
            required:
              - currency_code
            properties:
              currency_code:
                type: string
                example: USD
                minLength: 3
                maxLength: 3
              include:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    operator:
                      type: string
                    segments:
                      type: array
                      items:
                        type: object
                        properties:
                          targeting_segment_id:
                            type: integer
                          user_cpm:
                            type: number
              exclude:
                type: object
                properties:
                  code:
                    type: string
                  operator:
                    type: string
                  segments:
                    type: array
                    items:
                      type: object
                      properties:
                        targeting_segment_id:
                          type: integer
                        user_cpm:
                          type: number
    marketplace_create:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/marketplace_create'
    marketplace_update:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/marketplace_update'
    strategy_template_create:
      content:
        application/json:
          schema:
            type: object
            properties:
              organization_id:
                type: integer
                format: int32
                nullable: true
              agency_id:
                type: integer
                format: int32
                nullable: true
              advertiser_id:
                type: integer
                format: int32
                nullable: true
              global:
                type: boolean
                nullable: true
              name:
                type: string
                minLength: 1
                maxLength: 256
              description:
                type: string
                minLength: 1
                maxLength: 256
              template:
                type: string
            required:
              - name
              - description
              - template
          examples:
            GlobalTemplate:
              value:
                global: true
                name: valid strategy template (Global)
                description: this is an example of valid strategy template  at Global level
                template: 'key: value'
            OrganizationLevel:
              value:
                organization_id: 1
                name: valid strategy template (Organization)
                description: >-
                  this is an example of valid strategy template  at Organization
                  level
                template: 'key: value'
            AgencyLevel:
              value:
                agency_id: 190
                name: valid strategy template (Agency)
                description: this is an example of valid strategy template  at Agency level
                template: 'key: value'
            AdvertiserLevel:
              value:
                advertiser_id: 190
                name: valid strategy template (Advertiser)
                description: >-
                  this is an example of valid strategy template  at Advertiser
                  level
                template: 'key: value'
      description: ''
    attachment_create:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/attachment_create'
    attachment_update:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/attachment_update'
    target_create:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/target_create'
    target_update:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/target_update'
    strategy_bulk_update:
      content:
        application/json:
          schema:
            type: object
            properties:
              update:
                type: array
                items:
                  allOf:
                    - type: object
                      properties:
                        id:
                          type: integer
                          writeOnly: true
                      required:
                        - id
                    - $ref: '#/components/schemas/strategy_full'
    atomic_creative_create:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/atomic_creative_create'
              - $ref: '#/components/schemas/atomic_creative_creative'
              - $ref: '#/components/schemas/atomic_creative_vendor'
      description: ''
    atomic_creative_update:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/atomic_creative_update'
              - $ref: '#/components/schemas/atomic_creative_creative'
              - $ref: '#/components/schemas/atomic_creative_vendor'
    atomic_creative_bulk:
      content:
        application/json:
          schema:
            type: object
            properties:
              atomic_creatives:
                type: object
                properties:
                  create:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/atomic_creative_create'
                        - $ref: '#/components/schemas/atomic_creative_creative'
                        - $ref: '#/components/schemas/atomic_creative_vendor'
                  update:
                    type: array
                    items:
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: integer
                        - $ref: '#/components/schemas/atomic_creative_update'
                        - $ref: '#/components/schemas/atomic_creative_creative'
                        - $ref: '#/components/schemas/atomic_creative_vendor'
    pixel_bundle_create:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: object
                required:
                  - advertiser_id
                  - name
                  - pixel_type
                  - tag_type
              - $ref: '#/components/schemas/pixel_bundle_base'
    pixel_bundle_update:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/pixel_bundle_base'
    id_list:
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                type: array
                minItems: 1
                items:
                  type: integer
            required:
              - id
    organization_update:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              organizations:
                type: array
                items:
                  type: integer
              agencies:
                type: array
                items:
                  type: integer
              advertisers:
                type: array
                items:
                  type: integer
              campaigns:
                type: array
                items:
                  type: integer
              strategies:
                type: array
                items:
                  type: integer
    new_strategy_plan_create:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  advertiser_id:
                    type: integer
                  campaign_plan_id:
                    type: integer
                  channels:
                    type: array
                    items:
                      type: string
              - $ref: '#/components/schemas/new_strategy_plan_full'
    new_strategy_plan_update:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  version:
                    type: integer
                  campaign_plan_id:
                    type: integer
                  channels:
                    type: array
                    items:
                      type: string
              - $ref: '#/components/schemas/new_strategy_plan_full'
    audience_segments_estimate_cpm_and_size:
      content:
        application/json:
          schema:
            title: Audience Segment Estimate Request
            type: object
            required:
              - currency_code
              - include
            properties:
              currency_code:
                type: string
                example: USD
                minLength: 3
                maxLength: 3
              include:
                type: array
                items:
                  type: object
                  properties:
                    operator:
                      type: string
                    segments:
                      type: array
                      items:
                        type: object
                        properties:
                          audience_segment_id:
                            type: integer
                          user_cpm:
                            type: number
              exclude:
                type: object
                properties:
                  operator:
                    type: string
                  segments:
                    type: array
                    items:
                      type: object
                      properties:
                        audience_segment_id:
                          type: integer
                        user_cpm:
                          type: number
    campaign_update:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaign_update'
    campaign_create:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaign_create'
    dba:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/dba'
    permission_check:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              organizations:
                type: array
                items:
                  type: integer
              agencies:
                type: array
                items:
                  type: integer
              advertisers:
                type: array
                items:
                  type: integer
              campaigns:
                type: array
                items:
                  type: integer
              strategies:
                type: array
                items:
                  type: integer
    permission_v2_check:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              organizations:
                type: array
                items:
                  type: integer
              agencies:
                type: array
                items:
                  type: integer
              advertisers:
                type: array
                items:
                  type: integer
    concept_create:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/concept_create'
              - $ref: '#/components/schemas/concept_common'
      description: ''
    concept_update:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/concept_update'
              - $ref: '#/components/schemas/concept_common'
  responses:
    health_check:
      description: health check object response
      content:
        application/json:
          schema:
            title: health check response
            type: object
            properties:
              build_version:
                type: string
              database_connection:
                type: boolean
              latency:
                type: string
              node_conns:
                type: object
                properties:
                  acquired:
                    type: integer
                  constucting:
                    type: integer
                  idle:
                    type: integer
              node_max_conns:
                type: integer
              node_total_cons:
                type: integer
    error:
      description: error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
    strategy_plan:
      description: strategy plan response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_plan_response'
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    deleted_strategy_plans:
      description: deleted strategy plans response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                nullable: true
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    deleted_new_strategy_plans:
      description: deleted new strategy plans response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                nullable: true
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    audience_segment_estimate:
      $ref: '#/components/responses/audience_segments_estimate_cpm_and_size'
    strategy:
      description: strategy response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                allOf:
                  - type: object
                    properties:
                      campaign_name:
                        type: string
                      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
                      campaign_service_type:
                        type: string
                  - $ref: '#/components/schemas/strategy_full'
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    strategy_bulk:
      description: strategy creation response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/strategy_full'
              meta:
                $ref: '#/components/schemas/list_metadata'
    campaign:
      description: campaign response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/campaign_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    campaign_bulk:
      description: campaign bulk response
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                type: array
                items:
                  $ref: '#/components/schemas/campaign_bulk'
              meta:
                $ref: '#/components/schemas/list_metadata'
    collection:
      description: standard list of entities
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                nullable: true
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
              meta:
                $ref: '#/components/schemas/list_metadata'
    contextual_segment_estimate:
      description: cpm estimate response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  cpm:
                    type: object
                    required:
                      - value
                    properties:
                      currency_code:
                        type: string
                        minLength: 3
                        maxLength: 3
                      value:
                        type: number
                        format: double
                        minimum: 0
                        maximum: 999999999999.99
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    targeting_segment_friendly_name:
      description: targeting segment and parent vendor information for display
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                nullable: true
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    external_code:
                      type: string
                    friendly_name:
                      type: string
                    vendor_id:
                      type: number
                    vendor_name:
                      type: string
                    dimension_id:
                      type: number
                    code:
                      type: string
                    frequency:
                      type: number
                    name:
                      type: string
                    retail_cpm:
                      type: number
                    objective_id:
                      type: number
                    targeting_vendor_id:
                      type: number
                    segment_objective_name:
                      type: string
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    marketplace:
      description: marketplace response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/marketplace_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_template_created:
      description: Created
      content:
        application/json:
          schema:
            type: object
            properties:
              organization_id:
                type: integer
              agency_id:
                type: integer
              advertiser_id:
                type: integer
              global:
                type: boolean
              name:
                type: string
              description:
                type: string
              template:
                type: string
              created_on:
                type: string
                format: date-time
                readOnly: true
                nullable: true
              updated_on:
                type: string
                format: date-time
                readOnly: true
                nullable: true
    strategy_template_updated:
      description: Updated
      content:
        application/json:
          schema:
            type: object
            properties:
              organization_id:
                type: integer
              agency_id:
                type: integer
              advertiser_id:
                type: integer
              global:
                type: boolean
              name:
                type: string
              description:
                type: string
              template:
                type: string
              created_on:
                type: string
                format: date-time
                readOnly: true
              updated_on:
                type: string
                format: date-time
                readOnly: true
    target:
      description: Target response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/target_base'
              meta:
                $ref: '#/components/schemas/single_metadata'
    attachment:
      description: Attachment response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/attachment_base'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_extended:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_full_extended'
              meta:
                type: object
                properties:
                  status:
                    type: string
    atomic_creative:
      description: Atomic Creative response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/atomic_creative_response'
              meta:
                $ref: '#/components/schemas/single_metadata'
    atomic_creative_bulk:
      description: Atomic Creative Bulk response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/atomic_creative_response'
              meta:
                $ref: '#/components/schemas/list_metadata'
              errors:
                $ref: '#/components/schemas/bulk_errors'
    supply_source:
      description: supply source response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/supply_source_response'
              meta:
                $ref: '#/components/schemas/single_metadata'
    currency_rate:
      description: currency rate response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/currency_rate_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    ad_server:
      description: ad server response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/ad_server_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    site_list:
      description: site list response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/site_list_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    timezone:
      description: timezone response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/timezone_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_deal:
      description: strategy deal response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_deal_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_day_part:
      description: strategy day part response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_day_part_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_group:
      description: strategy group response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_group_full'
              meta:
                $ref: '#/components/schemas/list_metadata'
    strategy_group_extended:
      description: strategy group extended response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_group_full_extended'
              meta:
                $ref: '#/components/schemas/list_metadata'
    strategy_ip_address:
      description: strategy ip address response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_ip_address_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_concept:
      description: strategy concept response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_concept_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    targeting_segment:
      description: targeting segment response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/targeting_segment_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    strategy_target_value:
      description: strategy target value response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_target_value_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    new_strategy_plan_target_value:
      description: new strategy plan target value response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/strategy_plan_target_value_full'
              meta:
                $ref: '#/components/schemas/single_metadata'
    pixel_bundle:
      description: pixel bundle response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/pixel_bundle_base'
              meta:
                $ref: '#/components/schemas/single_metadata'
    audit_log:
      description: list of changes to an entity
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    action:
                      type: string
                    date:
                      type: string
                      format: date-time
                    fields:
                      type: array
                      items:
                        type: object
                        properties:
                          field_name:
                            type: string
                          old_value:
                            type: string
                          new_value:
                            type: string
                    user_name:
                      type: string
                    user_id:
                      type: integer
                    collection:
                      type: string
                    entity_id:
                      type: integer
                    tool_name:
                      type: string
              meta:
                $ref: '#/components/schemas/list_metadata'
    audit_log_bulk:
      description: list of changes to a group of entities
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    action:
                      type: string
                    date:
                      type: string
                      format: date-time
                    tool_name:
                      type: string
                    user_name:
                      type: string
                    user_id:
                      type: integer
                    collection:
                      type: string
                    entity_id:
                      type: integer
                    fields:
                      type: array
                      items:
                        type: object
                        properties:
                          field_name:
                            type: string
                          old_value:
                            type: string
                          new_value:
                            type: string
              meta:
                $ref: '#/components/schemas/list_metadata'
    new_strategy_plan:
      description: new strategy plan response
      content:
        application/json:
          schema:
            type: object
            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'
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    audience_segments_estimate_cpm_and_size:
      description: estimate response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  cpm:
                    type: object
                    required:
                      - currency_code
                      - value
                    properties:
                      currency_code:
                        type: string
                        minLength: 3
                        maxLength: 3
                      value:
                        type: number
                        format: double
                        minimum: 1
                        maximum: 999999999999.99
                  size:
                    type: integer
              meta:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    strategy_friendly_names:
      description: Friendly Names of Strategy Targeting
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/targeting_friendly_name'
              meta:
                $ref: '#/components/schemas/list_metadata'
    dba_bulk:
      description: dba bulk response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/dba'
              meta:
                $ref: '#/components/schemas/list_metadata'
    get_result:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                nullable: true
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    entity_type:
                      type: string
                    name:
                      type: string
                    must_include:
                      type: array
                      items:
                        type: number
                    must_exclude:
                      type: array
                      items:
                        type: number
              meta:
                $ref: '#/components/schemas/list_metadata'
    atomic_creative_collection:
      description: Atomic Creative Collection
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/atomic_creative_response'
              meta:
                $ref: '#/components/schemas/list_metadata'
    concept:
      description: Concept response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/concept_response'
              meta:
                $ref: '#/components/schemas/single_metadata'
    search_result:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  organizations:
                    type: array
                    items:
                      $ref: '#/components/schemas/search_result'
                  agencies:
                    type: array
                    items:
                      $ref: '#/components/schemas/search_result'
                  advertisers:
                    type: array
                    items:
                      $ref: '#/components/schemas/search_result'
              meta:
                $ref: '#/components/schemas/list_metadata'
    target_values_get_result:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                nullable: true
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    dimension_id:
                      type: number
                    dimension_code:
                      type: string
                    parent_value_id:
                      type: number
                    name:
                      type: string
                    value:
                      type: number
                    code:
                      type: string
                    is_targetable:
                      type: boolean
                    full_path:
                      type: string
              meta:
                $ref: '#/components/schemas/list_metadata'
    technology_target_values_get_result:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                nullable: true
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    dimension:
                      type: string
                    name:
                      type: string
                    full_path:
                      type: string
                    value:
                      type: number
                    code:
                      type: string
              meta:
                $ref: '#/components/schemas/list_metadata'
    targeting_segment_objective:
      description: targeting_segment_objectives response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/targeting_segment_objective_response'
              meta:
                $ref: '#/components/schemas/single_metadata'
  securitySchemes:
    Auth0:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://auth.mediamath.com/authorize
          scopes:
            offline_access: for refresh tokens
            manage:services: normal access
          tokenUrl: https://auth.mediamath.com/oauth/token
          refreshUrl: https://auth.mediamath.com/authorize?scope=offline_access
      description: ''
security:
  - Auth0:
      - offline_access
      - manage:services
tags:
  - name: Organizations
    description: Organizations
  - name: Agencies
    description: Agencies
  - name: Advertisers
    description: Advertisers
  - name: Campaigns
    description: Campaigns
  - name: Strategies
    description: Strategies
  - name: Targeting
    description: Targeting
  - name: Vendor Contracts
    description: Vendor Contracts
  - name: Strategy Templates
    description: Strategy Templates
  - name: Atomic Creatives
    description: Atomic Creatives
  - name: Concepts
    description: Concepts
  - name: Creatives
    description: Creatives
  - name: Pixel Bundles
    description: Pixel Bundles
  - name: Campaign Plans
    description: Campaign Plans
  - name: Strategy Plans
    description: Strategy Plans
  - name: Bulk Update
    description: Bulk Update
  - name: Marketplaces
    description: Marketplaces
  - name: Users
    description: Users
  - name: Enterprise Controls
    description: Enterprise Controls
  - name: General
    description: General
  - name: Currency Rates
    description: Currency Rates
  - name: Site Lists
    description: Site Lists
  - name: Timezones
    description: Timezones
  - name: Strategy Groups
    description: Strategy Groups
  - name: Strategy Day Parts
    description: Strategy Day Parts
  - name: Strategy Deals
    description: Strategy Deals
  - name: Strategy IP Addresses
    description: Strategy IP Addresses
  - name: Strategy Concepts
    description: Strategy Concepts
  - name: Targeting Segments
    description: Targeting Segments
  - name: Strategy Target Values
    description: Strategy Target Values
  - name: Pixel Bundles
    description: Pixel Bundles
