openapi: 3.0.3
info:
  title: Everflow Network API - Advertisers
  description: >
    Endpoints for managing advertisers in the Everflow network.
    To learn more about advertisers, see the [Advertiser overview](https://helpdesk.everflow.io/customer/who-is-an-advertiser-in-everflow).
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
tags:
  - name: Advertisers
paths:
  /networks/advertiserstable:
    post:
      summary: Find Advertisers (Advanced)
      tags:
        - Advertisers
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: Page number (1-based).
        - in: query
          name: page_size
          schema:
            type: integer
            default: 50
            maximum: 2000
          description: Number of results per page.
      requestBody:
        content:
          application/json:
            example:
              search_terms:
                - search_type: "name"
                  value: "DocTest"
              filters:
                account_status: "active"
                account_manager_ids: [2]
                labels: ["updated-label"]
            schema:
              type: object
              properties:
                search_terms:
                  type: array
                  description: Text search filters.
                  items:
                    type: object
                    required:
                      - search_type
                      - value
                    properties:
                      search_type:
                        type: string
                        enum:
                          - name
                        description: The field to search on. Only `name` is supported.
                      value:
                        type: string
                        description: The search term.
                filters:
                  type: object
                  description: Structured filters to narrow results.
                  properties:
                    account_status:
                      type: string
                      enum:
                        - active
                        - inactive
                        - suspended
                      description: >
                        Filter advertisers based on a specific account status.
                        Supported values are: `active`, `inactive` and `suspended`.
                    account_manager_ids:
                      type: array
                      items:
                        type: integer
                      description: Only include advertisers managed by the specified account managers.
                    labels:
                      type: array
                      items:
                        type: string
                      description: Only include advertisers matching the specified labels.
                    business_unit_ids:
                      type: array
                      items:
                        type: integer
                      description: Filter advertisers based on the specified business units.
                    sales_manager_ids:
                      type: array
                      items:
                        type: integer
                      description: Only include advertisers managed by the specified sales managers.
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                advertisers:
                  - network_advertiser_id: 66
                    network_id: 1
                    name: "DocTest Updated Advertiser"
                    account_status: "active"
                    account_manager_id: 2
                    account_manager_name: "Justin Black"
                    sales_manager_id: 2
                    sales_manager_name: "Justin Black"
                    today_revenue: "$0.00"
                    time_created: 1774618267
                    time_saved: 1774619075
                    labels:
                      - "updated-label"
                    verification_token: "updatedtoken123"
                  - network_advertiser_id: 13
                    network_id: 1
                    name: "William Fowler Inc."
                    account_status: "active"
                    account_manager_id: 2
                    account_manager_name: "Justin Black"
                    sales_manager_id: 0
                    sales_manager_name: ""
                    today_revenue: "$0.00"
                    time_created: 1774296114
                    time_saved: 1774296114
                    labels: null
                    verification_token: ""
                paging:
                  page: 1
                  page_size: 100
                  total_count: 9
              schema:
                type: object
                properties:
                  advertisers:
                    type: array
                    items:
                      type: object
                      properties:
                        network_advertiser_id:
                          type: integer
                          description: Unique advertiser ID.
                        network_id:
                          type: integer
                          description: Network ID.
                        name:
                          type: string
                          description: Advertiser name.
                        account_status:
                          type: string
                          enum:
                            - active
                            - inactive
                            - suspended
                          description: Current account status.
                        account_manager_id:
                          type: integer
                          description: Account manager ID (alias for network_employee_id).
                        account_manager_name:
                          type: string
                          description: Account manager name.
                        sales_manager_id:
                          type: integer
                          description: Sales manager ID.
                        sales_manager_name:
                          type: string
                          description: Sales manager name.
                        today_revenue:
                          type: string
                          description: Today's revenue (formatted string).
                        time_created:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the advertiser was created.
                        time_saved:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the advertiser was last updated.
                        labels:
                          type: array
                          nullable: true
                          items:
                            type: string
                          description: Labels assigned to this advertiser. Returns `null` if no labels are assigned.
                        verification_token:
                          type: string
                          description: Verification token.
                  paging:
                    type: object
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_count:
                        type: integer
      security:
        - API Key: []
  /networks/advertisers:
    get:
      summary: List Advertisers
      description: Advertisers
      tags:
        - Returns every advertiser on the network, paginated. Use this for a straight listing; for filtered or sorted searches use the Advertisers Table endpoint instead.
      parameters:
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: The page of results to retrieve.
        - in: query
          name: page_size
          required: false
          schema:
            type: integer
            minimum: 1
            default: 50
          description: The number of results to return per page.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  advertisers:
                    type: array
                    items:
                      $ref: "#/components/schemas/Advertiser"
                  paging:
                    type: object
                    description: Pagination information.
                    properties:
                      page:
                        type: integer
                        description: Current page number.
                      page_size:
                        type: integer
                        description: Number of results per page.
                      total_count:
                        type: integer
                        description: Total number of results across all pages.
      security:
        - API Key: []
    post:
      summary: Create Advertiser
      tags:
        - Advertisers
      parameters:
        - in: query
          name: notification
          schema:
            type: boolean
            default: true
          description: Whether to send a welcome notification email to the advertiser. Defaults to `true` when omitted.
      requestBody:
        required: true
        content:
          application/json:
            example:
              name: "DocTest Advertiser Create"
              account_status: "active"
              network_employee_id: 2
              default_currency_id: "USD"
              reporting_timezone_id: 90
              offer_id_macro: "oid"
              affiliate_id_macro: "affid"
              billing:
                billing_frequency: "monthly"
                details:
                  day_of_month: 1
                default_invoice_is_hidden: true
                tax_id: "123-45-6789"
                is_invoice_creation_auto: true
                auto_invoice_start_date: "2026-04-01"
                invoice_amount_threshold: 100.00
                invoice_generation_days_delay: 7
                default_payment_terms: 30
              sales_manager_id: 2
              internal_notes: "Test internal notes"
              labels:
                - "test-label"
                - "doctest"
              verification_token: "abc123token"
              is_contact_address_enabled: true
              contact_address:
                address_1: "123 Main St"
                address_2: "Suite 100"
                country_code: "US"
                city: "New York"
                region_code: "NY"
                zip_postal_code: "10001"
              platform_name: "Shopify"
              platform_url: "https://shopify.com"
              platform_username: "testuser"
              accounting_contact_email: "accounting@test.com"
              settings:
                exposed_variables:
                  affiliate_id: true
                  affiliate: true
                  sub1: true
                  sub2: false
                  sub3: false
                  sub4: false
                  sub5: false
                  sub6: false
                  sub7: false
                  sub8: false
                  sub9: false
                  sub10: false
                  source_id: true
                  offer_url: false
            schema:
              $ref: "#/components/schemas/AdvertiserInput"
      responses:
        "200":
          description: Advertiser created successfully.
          content:
            application/json:
              example:
                network_advertiser_id: 67
                network_id: 1
                name: "DocTest Advertiser Create"
                account_status: "active"
                network_employee_id: 2
                internal_notes: "Test internal notes"
                address_id: 1
                is_contact_address_enabled: true
                sales_manager_id: 2
                is_expose_publisher_reporting_data: null
                default_currency_id: "USD"
                platform_name: "Shopify"
                platform_url: "https://shopify.com"
                platform_username: "testuser"
                reporting_timezone_id: 90
                accounting_contact_email: "accounting@test.com"
                verification_token: "abc123token"
                offer_id_macro: "oid"
                affiliate_id_macro: "affid"
                time_created: 1774618466
                time_saved: 1774618466
                relationship:
                  labels:
                    total: 2
                    entries:
                      - "doctest"
                      - "test-label"
                  users:
                    total: 0
                    entries: []
                  account_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                  contact_address:
                    address_id: 1
                    network_id: 1
                    address_1: "123 Main St"
                    address_2: "Suite 100"
                    city: "New York"
                    region_code: "NY"
                    country_id: 227
                    country_code: "US"
                    zip_postal_code: "10001"
                  sale_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                attribution_method: "last_touch"
                email_attribution_method: "last_affiliate_attribution"
                attribution_priority: "click"
              schema:
                $ref: "#/components/schemas/Advertiser"
      security:
        - API Key: []
  /networks/shortened/advertisers:
    get:
      summary: List Advertisers (Short)
      tags:
        - Advertisers
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    network_advertiser_id:
                      type: integer
                      description: Unique advertiser ID.
                    name:
                      type: string
                      description: Advertiser name.
                    account_status:
                      type: string
                      description: Account status.
      security:
        - API Key: []
  /networks/advertisers/{advertiserId}:
    get:
      summary: Get Advertiser by ID
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
        - in: query
          name: relationship
          schema:
            type: string
            enum:
              - reporting
              - labels
              - demand_partner
              - billing
              - integrations
              - api
              - settings
              - product_feed
              - deal
          description: >
            Include related data in the response. Available relationships:

            - `reporting` — Includes reporting information (clicks, conversions, revenue, etc.)

            - `labels` — Includes a list of labels associated to the advertiser

            - `demand_partner` — Includes the Everxchange information associated to the advertiser

            - `billing` — Includes the billing information associated to the advertiser

            - `integrations` — Includes the integration settings associated to the advertiser

            - `api` — Includes the advertiser's API keys and whitelisted IPs

            - `settings` — Includes the advertiser's settings (exposed variables)

            - `product_feed` — Includes product feeds configured for this advertiser

            - `deal` — Includes deals configured for this advertiser
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_advertiser_id: 66
                network_id: 1
                name: "DocTest Updated Advertiser"
                account_status: "active"
                network_employee_id: 2
                internal_notes: "Updated notes via API"
                address_id: 2
                is_contact_address_enabled: true
                sales_manager_id: 2
                is_expose_publisher_reporting_data: null
                default_currency_id: "USD"
                platform_name: "Adjust"
                platform_url: "https://adjust.com"
                platform_username: "adjuser"
                reporting_timezone_id: 90
                accounting_contact_email: "billing@test.com"
                verification_token: "updatedtoken123"
                offer_id_macro: "oid"
                affiliate_id_macro: "affid"
                time_created: 1774618267
                time_saved: 1774619075
                relationship:
                  labels:
                    total: 1
                    entries:
                      - "updated-label"
                  account_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                  reporting:
                    imp: 0
                    total_click: 0
                    unique_click: 0
                    invalid_click: 0
                    duplicate_click: 0
                    gross_click: 0
                    ctr: 0
                    cv: 0
                    invalid_cv_scrub: 0
                    view_through_cv: 0
                    total_cv: 0
                    event: 0
                    cvr: 0
                    evr: 0
                    cpc: 0
                    cpm: 0
                    cpa: 0
                    epc: 0
                    rpc: 0
                    rpa: 0
                    rpm: 0
                    payout: 0
                    revenue: 0
                    event_revenue: 0
                    gross_sales: 0
                    profit: 0
                    margin: 0
                    roas: 0
                    avg_sale_value: 0
                    media_buying_cost: 0
                    on_hold_potential_revenue: 0
                    on_hold_potential_payout: 0
                    on_hold_conversion_count: 0
                    public_events: 0
                  contact_address:
                    address_id: 2
                    network_id: 1
                    address_1: "456 Oak Ave"
                    address_2: "Floor 3"
                    city: "San Francisco"
                    region_code: "CA"
                    country_id: 227
                    country_code: "US"
                    zip_postal_code: "94102"
                  api_keys:
                    total: 0
                    entries: []
                  api_whitelist_ips:
                    total: 0
                    entries: []
                  billing:
                    network_id: 1
                    network_advertiser_id: 66
                    billing_frequency: "monthly"
                    invoice_amount_threshold: 50
                    tax_id: "987-65-4321"
                    is_invoice_creation_auto: true
                    auto_invoice_start_date: "2026-04-01 00:00:00"
                    default_invoice_is_hidden: false
                    invoice_generation_days_delay: 10
                    default_payment_terms: 30
                    relationship:
                      monthly:
                        day_of_month: 1
                  settings:
                    network_id: 1
                    network_advertiser_id: 66
                    exposed_variables:
                      affiliate_id: true
                      affiliate: false
                      sub1: true
                      sub2: true
                      sub3: false
                      sub4: false
                      sub5: false
                      sub6: false
                      sub7: false
                      sub8: false
                      sub9: false
                      sub10: false
                      source_id: false
                      offer_url: true
                    time_saved: 1774619075
                  sale_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                attribution_method: "last_touch"
                email_attribution_method: "last_affiliate_attribution"
                attribution_priority: "click"
              schema:
                $ref: "#/components/schemas/Advertiser"
        "404":
          description: Advertiser not found.
      security:
        - API Key: []
    put:
      summary: Update Advertiser
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID to update.
      requestBody:
        required: true
        content:
          application/json:
            example:
              name: "DocTest Updated Advertiser"
              account_status: "active"
              network_employee_id: 2
              default_currency_id: "USD"
              reporting_timezone_id: 90
              offer_id_macro: "oid"
              affiliate_id_macro: "affid"
              billing:
                billing_frequency: "monthly"
                details:
                  day_of_month: 1
                default_invoice_is_hidden: false
                tax_id: "987-65-4321"
                is_invoice_creation_auto: true
                auto_invoice_start_date: "2026-04-01"
                invoice_amount_threshold: 50.00
                invoice_generation_days_delay: 10
                default_payment_terms: 30
              sales_manager_id: 2
              internal_notes: "Updated notes via API"
              labels:
                - "updated-label"
              verification_token: "updatedtoken123"
              is_contact_address_enabled: true
              contact_address:
                address_1: "456 Oak Ave"
                address_2: "Floor 3"
                country_code: "US"
                city: "San Francisco"
                region_code: "CA"
                zip_postal_code: "94102"
              platform_name: "Adjust"
              platform_url: "https://adjust.com"
              platform_username: "adjuser"
              accounting_contact_email: "billing@test.com"
              settings:
                exposed_variables:
                  affiliate_id: true
                  affiliate: false
                  sub1: true
                  sub2: true
                  sub3: false
                  sub4: false
                  sub5: false
                  sub6: false
                  sub7: false
                  sub8: false
                  sub9: false
                  sub10: false
                  source_id: false
                  offer_url: true
            schema:
              $ref: "#/components/schemas/AdvertiserUpdateInput"
      responses:
        "200":
          description: Advertiser updated successfully.
          content:
            application/json:
              example:
                network_advertiser_id: 66
                network_id: 1
                name: "DocTest Updated Advertiser"
                account_status: "active"
                network_employee_id: 2
                internal_notes: "Updated notes via API"
                address_id: 2
                is_contact_address_enabled: true
                sales_manager_id: 2
                is_expose_publisher_reporting_data: null
                default_currency_id: "USD"
                platform_name: "Adjust"
                platform_url: "https://adjust.com"
                platform_username: "adjuser"
                reporting_timezone_id: 90
                accounting_contact_email: "billing@test.com"
                verification_token: "updatedtoken123"
                offer_id_macro: "oid"
                affiliate_id_macro: "affid"
                time_created: 1774618267
                time_saved: 1774619075
                relationship:
                  labels:
                    total: 1
                    entries:
                      - "updated-label"
                  account_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                  contact_address:
                    address_id: 2
                    network_id: 1
                    address_1: "456 Oak Ave"
                    address_2: "Floor 3"
                    city: "San Francisco"
                    region_code: "CA"
                    country_id: 227
                    country_code: "US"
                    zip_postal_code: "94102"
                  sale_manager:
                    first_name: "Justin"
                    last_name: "Black"
                    email: "jblack@example.com"
                    work_phone: "9781243585"
                    cell_phone: ""
                    instant_messaging_id: 0
                    instant_messaging_identifier: ""
                attribution_method: "last_touch"
                email_attribution_method: "last_affiliate_attribution"
                attribution_priority: "click"
              schema:
                $ref: "#/components/schemas/Advertiser"
        "404":
          description: Advertiser not found.
      security:
        - API Key: []
  /networks/advertisers/{advertiserId}/blacklist:
    get:
      summary: Get Advertiser Affiliate Blacklist
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    network_affiliate_id:
                      type: integer
                      description: Blacklisted affiliate ID.
                    name:
                      type: string
                      description: Affiliate name.
      security:
        - API Key: []
  /networks/advertisers/{advertiserId}/events:
    get:
      summary: List Advertiser Events
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                global_events:
                  - network_advertiser_global_event_id: 2
                    entry_name: "Registration"
                    network_id: 1
                    advertiser_id: 13
                    status: "active"
                    time_created: 1774724566
                    time_saved: 1774724566
                    relationship: {}
              schema:
                type: object
                properties:
                  global_events:
                    type: array
                    items:
                      type: object
                      properties:
                        network_advertiser_global_event_id:
                          type: integer
                          description: Unique event ID.
                        entry_name:
                          type: string
                          description: Name of the event.
                        network_id:
                          type: integer
                          description: Network ID.
                        advertiser_id:
                          type: integer
                          description: Advertiser ID.
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                          description: Status of the event.
                        time_created:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp of creation.
                        time_saved:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp of last update.
                        relationship:
                          type: object
                          description: Related data.
      security:
        - API Key: []
    post:
      summary: Create Advertiser Event
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
      requestBody:
        required: true
        content:
          application/json:
            example:
              entry_name: "Registration"
              status: "active"
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Event name.
                status:
                  type: string
                  description: Event status.
      responses:
        "200":
          description: Event created successfully.
      security:
        - API Key: []
  /networks/advertisers/{advertiserId}/productfeeds:
    post:
      summary: Create Product Feed
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
      requestBody:
        required: true
        content:
          application/json:
            example:
              name: "Test Product Feed"
              status: "active"
              url: "https://example.com/feed.xml"
            schema:
              type: object
              required:
                - name
                - url
              properties:
                name:
                  type: string
                  description: Product feed name.
                url:
                  type: string
                  description: URL of the product feed.
      responses:
        "200":
          description: Product feed created successfully.
      security:
        - API Key: []
  /networks/advertisers/{advertiserId}/productfeeds/{feedId}:
    delete:
      summary: Delete Product Feed
      tags:
        - Advertisers
      parameters:
        - in: path
          name: advertiserId
          required: true
          schema:
            type: integer
          description: The unique advertiser ID.
        - in: path
          name: feedId
          required: true
          schema:
            type: integer
          description: The unique product feed ID to delete.
      responses:
        "200":
          description: Product feed deleted successfully.
        "404":
          description: Product feed not found.
      security:
        - API Key: []
  /networks/patch/advertiser/submit:
    post:
      summary: Advertiser Bulk Edit Preview
      description: >
        Preview changes that would be applied by a bulk edit operation without
        actually modifying any data. This endpoint works exactly the same way
        as the Bulk Edit endpoint, with the important difference that it does
        not actually change anything. Rather, the endpoint returns a preview of
        the changes and flags any errors.
      tags:
        - Advertisers
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_advertiser_ids: [13, 26]
              fields:
                - field_type: "variables_sub_2"
                  field_value: true
                  operator: "overwrite"
            schema:
              $ref: "#/components/schemas/AdvertiserPatchInput"
      responses:
        "200":
          description: Preview of changes that would be applied.
          content:
            application/json:
              example:
                changes:
                  - network_advertiser:
                      network_advertiser_id: 13
                      network_id: 1
                      name: "William Fowler Inc."
                      account_status: "active"
                    change_status: "ok"
                    current_field:
                      field_type: "variables_sub_2"
                      field_value: false
                      operator: "overwrite"
                    changed_field:
                      field_type: "variables_sub_2"
                      field_value: true
                      operator: "overwrite"
                    error_message: ""
                    related_changes: ""
                  - network_advertiser:
                      network_advertiser_id: 26
                      network_id: 1
                      name: "Nadine Hays Inc."
                      account_status: "active"
                    change_status: "ok"
                    current_field:
                      field_type: "variables_sub_2"
                      field_value: false
                      operator: "overwrite"
                    changed_field:
                      field_type: "variables_sub_2"
                      field_value: true
                      operator: "overwrite"
                    error_message: ""
                    related_changes: ""
                resource_errors: []
              schema:
                $ref: "#/components/schemas/AdvertiserPatchResponse"
      security:
        - API Key: []
  /networks/patch/advertiser/apply:
    patch:
      summary: Apply Advertiser Bulk Edit
      description: >
        Apply bulk changes to one or more advertisers. Uses the same request
        format as the Bulk Edit Preview endpoint, but actually applies the changes.
        It is recommended to use the Bulk Edit Preview endpoint first to verify the
        changes before applying them.
      tags:
        - Advertisers
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_advertiser_ids: [13, 26]
              fields:
                - field_type: "variables_sub_2"
                  field_value: true
                  operator: "overwrite"
            schema:
              $ref: "#/components/schemas/AdvertiserPatchInput"
      responses:
        "200":
          description: Changes applied successfully.
          content:
            application/json:
              example:
                result: true
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                    description: Whether the bulk edit was applied successfully.
      security:
        - API Key: []
components:
  schemas:
    AdvertiserPatchInput:
      type: object
      required:
        - network_advertiser_ids
        - fields
      properties:
        network_advertiser_ids:
          type: array
          items:
            type: integer
          description: IDs of the advertisers to be patched.
        fields:
          type: array
          description: >
            List of fields to patch. Each entry specifies a field type, value,
            and operator determining how the change is applied.
          items:
            type: object
            required:
              - field_type
              - field_value
              - operator
            properties:
              field_type:
                type: string
                description: >
                  Type of the field to patch. See the patchable fields list below for
                  supported values.
                enum:
                  - advertiser_status
                  - account_manager_id
                  - sales_manager_id
                  - labels
                  - advertiser_name
                  - currency_id
                  - attribution_method
                  - attribution_priority
                  - email_attribution_method
                  - internal_note
                  - verification_token
                  - variables_affiliate_id
                  - variables_affiliate
                  - variables_sub_1
                  - variables_sub_2
                  - variables_sub_3
                  - variables_sub_4
                  - variables_sub_5
                  - variables_source_id
                  - billing_tax_details
                  - billing_frequency
                  - billing_frequency_weekly
                  - billing_frequency_bimonthly
                  - billing_frequency_monthly
                  - billing_frequency_two_months
                  - billing_frequency_quarterly
                  - billing_auto_invoicing_auto_creation
                  - billing_auto_invoicing_creation_amount_threshold
                  - billing_auto_invoicing_auto_invoice_start_date
                  - billing_auto_invoicing_generation_days_delay
                  - billing_invoice_setting_terms_days
                  - billing_invoice_setting_hide_from_advertiser
                  - offer_id_macro
                  - affiliate_id_macro
              field_value:
                description: >
                  Value of the field to patch. The type depends on the `field_type`:

                  **String fields:** `advertiser_status` (`active`, `inactive`, `suspended`),
                  `advertiser_name`, `currency_id` (from metadata API), `attribution_method`
                  (`first_touch`, `last_touch`), `attribution_priority` (`click`, `coupon_code`),
                  `email_attribution_method` (`first_affiliate_attribution`, `last_affiliate_attribution`),
                  `internal_note`, `verification_token` (max 50 alphanumeric characters),
                  `billing_tax_details`, `billing_frequency` (`weekly`, `bimonthly`, `monthly`,
                  `two_months`, `quarterly`, `manual`, `other`),
                  `billing_auto_invoicing_auto_invoice_start_date` (YYYY-MM-DD format),
                  `offer_id_macro`, `affiliate_id_macro`.

                  **Integer fields:** `account_manager_id`, `sales_manager_id`,
                  `billing_auto_invoicing_generation_days_delay`, `billing_invoice_setting_terms_days`.

                  **Number fields:** `billing_auto_invoicing_creation_amount_threshold`.

                  **Boolean fields:** `variables_affiliate_id`, `variables_affiliate`,
                  `variables_sub_1` through `variables_sub_5`, `variables_source_id`,
                  `billing_auto_invoicing_auto_creation`,
                  `billing_invoice_setting_hide_from_advertiser`.

                  **String array fields:** `labels`.

                  **Object fields (billing frequency details):**

                  - `billing_frequency_weekly`: `{"day_of_week": 0}` (0=Sunday .. 6=Saturday)

                  - `billing_frequency_bimonthly`: `{"day_of_month_one": 1, "day_of_month_two": 15}`

                  - `billing_frequency_monthly`: `{"day_of_month": 1}`

                  - `billing_frequency_two_months`: `{"day_of_month": 1, "starting_month": 1}`

                  - `billing_frequency_quarterly`: `{"day_of_month": 1, "starting_month": 1}`
              operator:
                type: string
                enum:
                  - overwrite
                  - append
                  - delete
                  - clear
                description: >
                  Operator determining how the field will be used to modify the advertisers.

                  - `overwrite` — Replace the current value with the new value.

                  - `append` — Add the value to the existing list (only applicable to array fields like `labels`).

                  - `delete` — Remove the value from the existing list (only applicable to array fields like `labels`).

                  - `clear` — Clear the field value entirely (only applicable to array fields like `labels`).
    AdvertiserPatchResponse:
      type: object
      properties:
        changes:
          type: array
          description: List of changes that would be applied (or were applied) per advertiser.
          items:
            type: object
            properties:
              network_advertiser:
                type: object
                description: Summary of the advertiser being modified.
                properties:
                  network_advertiser_id:
                    type: integer
                    description: Advertiser ID.
                  network_id:
                    type: integer
                    description: Network ID.
                  name:
                    type: string
                    description: Advertiser name.
                  account_status:
                    type: string
                    description: Current account status.
              change_status:
                type: string
                description: Status of the change. `ok` indicates the change is valid.
              current_field:
                type: object
                description: The current value of the field before the change.
                properties:
                  field_type:
                    type: string
                  field_value: {}
                  operator:
                    type: string
              changed_field:
                type: object
                description: The new value of the field after the change.
                properties:
                  field_type:
                    type: string
                  field_value: {}
                  operator:
                    type: string
              error_message:
                type: string
                description: Error message if the change is invalid. Empty string if no error.
              related_changes:
                type: string
                description: Related changes triggered by this change. Empty string if none.
        resource_errors:
          type: array
          description: Errors related to the resources (advertisers) being patched.
          items:
            type: object
    Advertiser:
      type: object
      properties:
        network_advertiser_id:
          type: integer
          description: Unique advertiser ID.
        network_id:
          type: integer
          description: Network ID.
        name:
          type: string
          description: Advertiser name.
        account_status:
          type: string
          enum:
            - active
            - inactive
            - pending
            - suspended
          description: Current account status.
        network_employee_id:
          type: integer
          description: Account manager employee ID.
        sales_manager_id:
          type: integer
          description: Sales manager employee ID.
        internal_notes:
          type: string
          description: Private notes visible only to network users.
        default_currency_id:
          type: string
          description: ISO currency code for the advertiser's default currency (e.g. "USD").
        platform_name:
          type: string
          description: Shopping cart or attribution platform name (e.g. Shopify, Adjust).
        platform_url:
          type: string
          description: URL for logging into the advertiser's platform.
        platform_username:
          type: string
          description: Username for the advertiser's platform.
        reporting_timezone_id:
          type: integer
          description: Timezone ID used for this advertiser's reporting.
        attribution_method:
          type: string
          enum:
            - first_touch
            - last_touch
          description: Click attribution method.
        email_attribution_method:
          type: string
          enum:
            - last_affiliate_attribution
            - first_affiliate_attribution
          description: Email-based attribution method.
        attribution_priority:
          type: string
          enum:
            - click
            - coupon_code
          description: Whether clicks or coupon codes take priority for attribution.
        accounting_contact_email:
          type: string
          description: Email address for accounting/billing contact.
        verification_token:
          type: string
          description: Verification token for postback security (max 50 alphanumeric characters).
        offer_id_macro:
          type: string
          description: Offer ID parameter name for Direct Linking.
        affiliate_id_macro:
          type: string
          description: Partner ID parameter name for Direct Linking.
        address_id:
          type: integer
          description: Address record ID.
        is_contact_address_enabled:
          type: boolean
          description: Whether a contact address is stored for this advertiser.
        is_expose_publisher_reporting_data:
          type: boolean
          nullable: true
          description: Whether publisher reporting data is exposed to this advertiser.
        contact_address:
          type: object
          writeOnly: true
          description: Contact address. Only used in create/update requests.
          properties:
            address_1:
              type: string
            address_2:
              type: string
            city:
              type: string
            region_code:
              type: string
            country_code:
              type: string
            zip_postal_code:
              type: string
        labels:
          type: array
          writeOnly: true
          description: Labels to assign. Only used in create/update requests. Use the relationship object to read labels.
          items:
            type: string
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp when the advertiser was created.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp when the advertiser was last updated.
        relationship:
          type: object
          description: Related data (only present when requested via query parameter).
          properties:
            labels:
              type: object
              description: Labels assigned to this advertiser.
              properties:
                total:
                  type: integer
                  description: Total number of labels.
                entries:
                  type: array
                  description: List of label strings.
                  items:
                    type: string
            users:
              type: object
              description: User accounts associated with this advertiser.
              properties:
                total:
                  type: integer
                entries:
                  type: array
                  items:
                    type: object
                    properties:
                      network_advertiser_user_id:
                        type: integer
                        description: Unique user ID.
                      network_id:
                        type: integer
                        description: Network ID.
                      network_advertiser_id:
                        type: integer
                        description: Advertiser ID this user belongs to.
                      first_name:
                        type: string
                        description: User's first name.
                      last_name:
                        type: string
                        description: User's last name.
                      email:
                        type: string
                        description: User's email address.
                      title:
                        type: string
                        description: User's title.
                      account_status:
                        type: string
                        enum:
                          - active
                          - inactive
                        description: User's account status.
                      work_phone:
                        type: string
                        description: Work phone number.
                      cell_phone:
                        type: string
                        description: Cell phone number.
                      instant_messaging_id:
                        type: integer
                        description: Instant messaging platform ID.
                      instant_messaging_identifier:
                        type: string
                        description: Instant messaging handle.
                      language_id:
                        type: integer
                        description: Language ID.
                      timezone_id:
                        type: integer
                        description: Timezone ID.
                      currency_id:
                        type: string
                        description: ISO currency code.
                      time_created:
                        type: integer
                        example: 1734455015
                        description: Unix timestamp of creation.
                      time_saved:
                        type: integer
                        example: 1734455015
                        description: Unix timestamp of last update.
            account_manager:
              type: object
              properties:
                first_name:
                  type: string
                last_name:
                  type: string
                email:
                  type: string
                work_phone:
                  type: string
                cell_phone:
                  type: string
                instant_messaging_id:
                  type: integer
                  description: The ID of an instant messaging platform. Allows you to save the user's identifier for further reference.
                instant_messaging_identifier:
                  type: string
                  description: Username or handle for the messaging platform.
            sale_manager:
              type: object
              properties:
                first_name:
                  type: string
                last_name:
                  type: string
                email:
                  type: string
                work_phone:
                  type: string
                cell_phone:
                  type: string
                instant_messaging_id:
                  type: integer
                  description: The ID of an instant messaging platform. Allows you to save the user's identifier for further reference.
                instant_messaging_identifier:
                  type: string
                  description: Username or handle for the messaging platform.
            reporting:
              type: object
              description: Reporting metrics for this advertiser (only present when requested via `?relationship=reporting`).
              properties:
                gross_click:
                  type: integer
                  description: Total gross clicks (including invalid).
                total_click:
                  type: integer
                  description: Total valid clicks.
                unique_click:
                  type: integer
                  description: Unique clicks.
                duplicate_click:
                  type: integer
                  description: Duplicate clicks.
                invalid_click:
                  type: integer
                  description: Invalid or flagged clicks.
                cv:
                  type: integer
                  description: Conversions.
                total_cv:
                  type: integer
                  description: Total conversions (including view-through).
                view_through_cv:
                  type: integer
                  description: View-through conversions.
                event:
                  type: integer
                  description: Total events.
                imp:
                  type: integer
                  description: Impressions.
                revenue:
                  type: number
                  format: double
                  description: Total revenue.
                payout:
                  type: number
                  format: double
                  description: Total payout.
                event_revenue:
                  type: number
                  format: double
                  description: Revenue from events.
                profit:
                  type: number
                  format: double
                  description: Total profit (revenue minus payout).
                margin:
                  type: number
                  format: double
                  description: Profit margin percentage.
                media_buying_cost:
                  type: number
                  format: double
                  description: Media buying cost.
                gross_sales:
                  type: number
                  format: double
                  description: Gross sales amount.
                avg_sale_value:
                  type: number
                  format: double
                  description: Average sale value.
                cpc:
                  type: number
                  format: double
                  description: Cost per click.
                cpa:
                  type: number
                  format: double
                  description: Cost per action.
                cpm:
                  type: number
                  format: double
                  description: Cost per mille (thousand impressions).
                epc:
                  type: number
                  format: double
                  description: Earnings per click.
                rpc:
                  type: number
                  format: double
                  description: Revenue per click.
                rpa:
                  type: number
                  format: double
                  description: Revenue per action.
                rpm:
                  type: number
                  format: double
                  description: Revenue per mille.
                ctr:
                  type: number
                  format: double
                  description: Click-through rate.
                cvr:
                  type: number
                  format: double
                  description: Conversion rate.
                evr:
                  type: number
                  format: double
                  description: Event rate.
                roas:
                  type: number
                  format: double
                  description: Return on ad spend.
                invalid_cv_scrub:
                  type: integer
                  description: Scrubbed invalid conversions.
                on_hold_potential_revenue:
                  type: number
                  format: double
                  description: Revenue from on-hold conversions.
                on_hold_potential_payout:
                  type: number
                  format: double
                  description: Payout from on-hold conversions.
                on_hold_conversion_count:
                  type: integer
                  description: Number of on-hold conversions.
                public_events:
                  type: integer
                  description: Number of public events.
            billing:
              type: object
              description: Billing configuration (only present when requested via `?relationship=billing`).
              properties:
                network_id:
                  type: integer
                  description: Network ID.
                network_advertiser_id:
                  type: integer
                  description: Advertiser ID.
                billing_frequency:
                  type: string
                  enum:
                    - weekly
                    - bimonthly
                    - monthly
                    - two_months
                    - quarterly
                    - manual
                    - other
                  description: How often the advertiser is invoiced.
                invoice_amount_threshold:
                  type: number
                  format: double
                  description: Minimum amount to trigger invoice generation.
                tax_id:
                  type: string
                  description: Tax ID / VAT or SSN.
                is_invoice_creation_auto:
                  type: boolean
                  description: Whether invoices are generated automatically.
                auto_invoice_start_date:
                  type: string
                  description: Start date for automatic invoicing.
                default_invoice_is_hidden:
                  type: boolean
                  description: Whether invoices are hidden from the advertiser.
                invoice_generation_days_delay:
                  type: integer
                  description: Days to wait after billing period before generating invoice.
                default_payment_terms:
                  type: integer
                  description: Payment terms in days.
                relationship:
                  type: object
                  description: Billing schedule details, keyed by frequency type (e.g. `monthly`, `weekly`).
            integrations:
              type: object
              description: Integration settings (only present when requested via `?relationship=integrations`).
              properties:
                advertiser_demand_partner:
                  type: object
                  description: Demand partner integration configuration.
            demand_partner:
              type: object
              description: Demand partner settings.
            contact_address:
              type: object
              description: Contact address on file for this advertiser.
              properties:
                address_id:
                  type: integer
                  description: Address record ID.
                network_id:
                  type: integer
                  description: Network ID.
                address_1:
                  type: string
                  description: Street address line 1.
                address_2:
                  type: string
                  description: Street address line 2.
                city:
                  type: string
                  description: City name.
                region_code:
                  type: string
                  description: State or region code (e.g. "CA").
                country_id:
                  type: integer
                  description: Numeric country ID.
                country_code:
                  type: string
                  description: Two-letter country code (e.g. "US").
                zip_postal_code:
                  type: string
                  description: ZIP or postal code.
            api_keys:
              type: object
              description: API keys associated with this advertiser.
              properties:
                total:
                  type: integer
                  description: Total number of API keys.
                entries:
                  type: array
                  items:
                    type: object
                    properties:
                      network_api_key_id:
                        type: integer
                        description: Unique API key record ID.
                      network_id:
                        type: integer
                        description: Network ID.
                      resource_id:
                        type: integer
                        description: Resource ID this key is associated with.
                      api_key:
                        type: string
                        description: The API key string.
                      resource_type:
                        type: string
                        description: Type of resource (e.g. "advertiser").
                      key_status:
                        type: string
                        enum:
                          - active
                          - revoked
                        description: Current status of the API key.
                      network_employee_id:
                        type: integer
                        description: Employee who created the key.
                      time_created:
                        type: integer
                        example: 1734455015
                        description: Unix timestamp of creation.
                      time_saved:
                        type: integer
                        example: 1734455015
                        description: Unix timestamp of last update.
                      modules:
                        type: object
                        nullable: true
                        description: API modules this key has access to.
                      api_key_name:
                        type: string
                        description: Display name for the API key.
                      relationship_modules:
                        type: object
                        nullable: true
                        description: Related module permissions.
                      relationship_resource:
                        type: object
                        nullable: true
                        description: Related resource details.
                      last_usage:
                        type: integer
                        description: Unix timestamp of last usage.
                      api_key_hash:
                        type: string
                        description: Hash of the API key.
            api_whitelist_ips:
              type: object
              description: Whitelisted IP addresses for API access.
              properties:
                total:
                  type: integer
                entries:
                  type: array
                  items:
                    type: object
            settings:
              type: object
              description: Advertiser-specific settings (only present when requested via `?relationship=settings`).
              properties:
                network_id:
                  type: integer
                  description: Network ID.
                network_advertiser_id:
                  type: integer
                  description: Advertiser ID.
                exposed_variables:
                  type: object
                  description: Controls which tracking variables are visible to this advertiser in reporting.
                  properties:
                    affiliate_id:
                      type: boolean
                      description: Whether the affiliate ID is exposed.
                    affiliate:
                      type: boolean
                      description: Whether the affiliate name is exposed.
                    sub1:
                      type: boolean
                      description: Whether sub-parameter 1 is exposed.
                    sub2:
                      type: boolean
                      description: Whether sub-parameter 2 is exposed.
                    sub3:
                      type: boolean
                      description: Whether sub-parameter 3 is exposed.
                    sub4:
                      type: boolean
                      description: Whether sub-parameter 4 is exposed.
                    sub5:
                      type: boolean
                      description: Whether sub-parameter 5 is exposed.
                    sub6:
                      type: boolean
                      description: Whether sub-parameter 6 is exposed.
                    sub7:
                      type: boolean
                      description: Whether sub-parameter 7 is exposed.
                    sub8:
                      type: boolean
                      description: Whether sub-parameter 8 is exposed.
                    sub9:
                      type: boolean
                      description: Whether sub-parameter 9 is exposed.
                    sub10:
                      type: boolean
                      description: Whether sub-parameter 10 is exposed.
                    source_id:
                      type: boolean
                      description: Whether the source ID is exposed.
                    offer_url:
                      type: boolean
                      description: Whether the offer URL is exposed.
                time_saved:
                  type: integer
                  description: Unix timestamp of last update.
            product_feeds:
              type: array
              description: Product feeds configured for this advertiser (only present when requested via `?relationship=product_feed`).
              items:
                type: object
                properties:
                  network_advertiser_product_feed_id:
                    type: integer
                    description: Unique product feed ID.
                  network_id:
                    type: integer
                    description: Network ID.
                  network_advertiser_id:
                    type: integer
                    description: Advertiser ID.
                  name:
                    type: string
                    description: Product feed name.
                  status:
                    type: string
                    description: Feed status (e.g. "active").
                  apply_to_all_affiliates:
                    type: boolean
                    description: Whether this feed applies to all affiliates.
                  affiliate_ids:
                    type: array
                    items:
                      type: integer
                    description: Specific affiliate IDs this feed applies to.
                  offer_ids:
                    type: array
                    items:
                      type: integer
                    description: Offer IDs associated with this feed.
                  file_asset_id:
                    type: integer
                    description: Uploaded file asset ID.
                  date_valid_from:
                    type: integer
                    description: Unix timestamp of validity start.
                  date_valid_to:
                    type: integer
                    description: Unix timestamp of validity end.
                  date_valid_timezone_id:
                    type: integer
                    description: Timezone ID for validity dates.
                  document_file:
                    type: string
                    description: Document file URL or path.
                  time_saved:
                    type: integer
                    example: 1734455015
                    description: Unix timestamp of last update.
                  time_created:
                    type: integer
                    example: 1734455015
                    description: Unix timestamp of creation.
            deals:
              type: array
              description: Deals configured for this advertiser (only present when requested via `?relationship=deal`).
              items:
                type: object
                properties:
                  network_advertiser_deal_id:
                    type: integer
                    description: Unique deal ID.
                  network_id:
                    type: integer
                    description: Network ID.
                  network_advertiser_id:
                    type: integer
                    description: Advertiser ID.
                  name:
                    type: string
                    description: Deal name.
                  deal_type:
                    type: string
                    description: Type of deal.
                  deal_status:
                    type: string
                    description: Current deal status.
                  deal_categories:
                    type: array
                    items:
                      type: string
                    description: Categories associated with this deal.
                  description:
                    type: string
                    description: Deal description.
                  restrictions:
                    type: string
                    description: Deal restrictions or terms.
                  scope:
                    type: string
                    description: Deal scope.
                  coupon_code:
                    type: string
                    description: Coupon code for this deal.
                  coupon_code_discount_percentage:
                    type: number
                    description: Discount percentage applied by the coupon.
                  coupon_code_discount_amount:
                    type: number
                    description: Fixed discount amount applied by the coupon.
                  coupon_code_discount_currency_id:
                    type: string
                    description: Currency for the discount amount.
                  threshold_quantity:
                    type: integer
                    description: Minimum quantity threshold to trigger the deal.
                  threshold_amount:
                    type: number
                    description: Minimum spend threshold to trigger the deal.
                  threshold_amount_currency_id:
                    type: string
                    description: Currency for the threshold amount.
                  purchase_limit_quantity:
                    type: integer
                    description: Maximum purchase quantity.
                  purchase_limit_amount:
                    type: number
                    description: Maximum purchase amount.
                  purchase_limit_amount_currency_id:
                    type: string
                    description: Currency for the purchase limit.
                  apply_to_all_affiliates:
                    type: boolean
                    description: Whether this deal applies to all affiliates.
                  affiliate_ids:
                    type: array
                    items:
                      type: integer
                    description: Specific affiliate IDs this deal applies to.
                  offer_ids:
                    type: array
                    items:
                      type: integer
                    description: Offer IDs associated with this deal.
                  date_valid_from:
                    type: integer
                    description: Unix timestamp of validity start.
                  date_valid_to:
                    type: integer
                    description: Unix timestamp of validity end.
                  date_valid_timezone_id:
                    type: integer
                    description: Timezone ID for validity dates.
                  brand_name:
                    type: string
                    description: Brand name associated with this deal.
                  time_saved:
                    type: integer
                    description: Unix timestamp of last update.
                  time_created:
                    type: integer
                    description: Unix timestamp of creation.
                  time_deleted:
                    type: integer
                    description: Unix timestamp of deletion (0 if not deleted).
    AdvertiserInput:
      type: object
      required:
        - name
        - account_status
        - network_employee_id
        - default_currency_id
        - reporting_timezone_id
        - billing
        - offer_id_macro
        - affiliate_id_macro
      properties:
        name:
          type: string
          description: The advertiser's display name.
        account_status:
          type: string
          enum:
            - active
            - inactive
            - suspended
          description: Account status.
        network_employee_id:
          type: integer
          description: ID of the account manager (network employee) assigned to this advertiser.
        default_currency_id:
          type: string
          description: ISO currency code for the advertiser's default currency (e.g. "USD").
        sales_manager_id:
          type: integer
          description: ID of the sales manager assigned to this advertiser.
        internal_notes:
          type: string
          description: Private notes visible only to network users.
        labels:
          type: array
          items:
            type: string
          description: Labels to assign to the advertiser.
        verification_token:
          type: string
          maxLength: 50
          description: >
            Adds an additional layer of security by requiring a unique encrypted ID
            to be passed in the Advertiser Postback, which can help prevent fraudulent
            conversions from being fired to Everflow. If the token doesn't match,
            conversions will be rejected. Supports up to 50 alphanumeric characters.
        attribution_method:
          type: string
          enum:
            - last_touch
            - first_touch
          default: last_touch
          description: >
            Click attribution method. Determines whether the first or last partner touchpoint
            receives attribution credit for conversions. Defaults to `last_touch`.
        attribution_priority:
          type: string
          enum:
            - click
            - coupon_code
          default: click
          description: Whether clicks or coupon codes take priority for attribution. Defaults to `click`.
        email_attribution_method:
          type: string
          enum:
            - last_affiliate_attribution
            - first_affiliate_attribution
          default: last_affiliate_attribution
          description: Email-based attribution method. Defaults to `last_affiliate_attribution`.
        is_contact_address_enabled:
          type: boolean
          description: Set to true to store a contact address for this advertiser.
        contact_address:
          type: object
          description: Contact address. Only used when `is_contact_address_enabled` is true.
          required:
            - address_1
            - country_code
          properties:
            address_1:
              type: string
              description: Street address line 1.
            address_2:
              type: string
              description: Apartment, suite, etc.
            country_code:
              type: string
              description: Two-letter country code (e.g. "US").
            country_id:
              type: integer
              description: Numeric country ID. Can be used as an alternative to `country_code`.
            city:
              type: string
            region_code:
              type: string
              description: State or region code (e.g. "CA").
            zip_postal_code:
              type: string
        billing:
          type: object
          description: Billing and invoicing configuration.
          required:
            - billing_frequency
            - default_invoice_is_hidden
          properties:
            billing_frequency:
              type: string
              enum:
                - weekly
                - bimonthly
                - monthly
                - two_months
                - quarterly
                - manual
                - other
              description: How often the advertiser is invoiced.
            details:
              type: object
              description: >
                Billing frequency details. Required when `billing_frequency` is not
                `manual` or `other`.
              properties:
                day_of_week:
                  type: integer
                  description: Day of the week (0=Sunday .. 6=Saturday). Required when `billing_frequency` is `weekly`.
                day_of_month_one:
                  type: integer
                  description: First day of the month. Required when `billing_frequency` is `bimonthly`.
                day_of_month_two:
                  type: integer
                  description: Second day of the month. Required when `billing_frequency` is `bimonthly`.
                day_of_month:
                  type: integer
                  description: Day of the month. Required when `billing_frequency` is `monthly`, `two_months`, or `quarterly`.
                starting_month:
                  type: integer
                  description: Starting month for the billing cycle. Required when `billing_frequency` is `two_months` or `quarterly`.
            tax_id:
              type: string
              description: Tax ID / VAT or SSN.
            is_invoice_creation_auto:
              type: boolean
              description: >
                Automatically generates invoices based on Billing Settings. These may be
                viewed under Advertiser > Invoices. Enabling this will be ignored if
                `billing_frequency` is set to `manual` or `other`. Defaults to `false`.
            auto_invoice_start_date:
              type: string
              description: >
                Start date for automatic invoicing (YYYY-MM-DD). Required when
                `is_invoice_creation_auto` is `true`.
            default_invoice_is_hidden:
              type: boolean
              description: Hide invoices from advertisers. When enabled, invoices will not be visible in the advertiser portal.
            invoice_amount_threshold:
              type: number
              format: double
              description: >
                The minimum amount needed in the set billing frequency to generate an invoice.
                Also defined as a payment threshold. Defaults to 0.
            invoice_generation_days_delay:
              type: integer
              description: >
                Number of days to wait after the billing period ends before generating the invoice.
                Common values: 0 (no delay), 1, 7, 10, 15, 30, or a custom number of days.
                Defaults to 0.
            default_payment_terms:
              type: integer
              description: >
                Payment terms in days on generated invoices. The amount of days which
                the invoice needs to be paid after the last day of the billing cycle.
                Common values: 7 (Net 7), 15 (Net 15), 30 (Net 30), 60 (Net 60), or a custom
                number of days. Set to 0 to disable. Defaults to 0.
        settings:
          type: object
          description: >
            Controls whether tracking variables are exposed in the Advertiser UI.
            Enabling this feature will overwrite the customizations (if defined) in
            Control Center > Platform Configurations > General.
          properties:
            exposed_variables:
              type: object
              description: Which tracking variables are visible to this advertiser in reporting.
              properties:
                affiliate_id:
                  type: boolean
                  description: Expose the affiliate ID.
                affiliate:
                  type: boolean
                  description: Expose the affiliate name.
                sub1:
                  type: boolean
                  description: Expose sub-parameter 1.
                sub2:
                  type: boolean
                  description: Expose sub-parameter 2.
                sub3:
                  type: boolean
                  description: Expose sub-parameter 3.
                sub4:
                  type: boolean
                  description: Expose sub-parameter 4.
                sub5:
                  type: boolean
                  description: Expose sub-parameter 5.
                sub6:
                  type: boolean
                  description: Expose sub-parameter 6.
                sub7:
                  type: boolean
                  description: Expose sub-parameter 7.
                sub8:
                  type: boolean
                  description: Expose sub-parameter 8.
                sub9:
                  type: boolean
                  description: Expose sub-parameter 9.
                sub10:
                  type: boolean
                  description: Expose sub-parameter 10.
                source_id:
                  type: boolean
                  description: Expose the source ID.
                offer_url:
                  type: boolean
                  description: Expose the offer URL.
        platform_name:
          type: string
          description: The name of the shopping cart or attribution platform that your advertiser uses (e.g. Shopify, Adjust).
        platform_url:
          type: string
          description: URL for logging into your advertiser's platform.
        platform_username:
          type: string
          description: Username details for logging into your advertiser's platform.
        reporting_timezone_id:
          type: integer
          description: Timezone ID used for this advertiser's reporting. Can be found using the metadata API.
        accounting_contact_email:
          type: string
          description: Email address for accounting/billing contact.
        offer_id_macro:
          type: string
          default: "oid"
          description: >
            Offer ID parameter for Direct Linking. This determines your preferred link
            format for receiving the Offer ID when using a Direct Linking Setup.
            Defaults to `oid`.
        affiliate_id_macro:
          type: string
          default: "affid"
          description: >
            Partner ID parameter for Direct Linking. This determines your preferred link
            format for receiving the Partner's ID when using a Direct Linking Setup.
            Defaults to `affid`.
        users:
          type: array
          description: >
            One or more user accounts to create for this advertiser. Only applicable
            on the create endpoint.
          items:
            type: object
            required:
              - first_name
              - last_name
              - email
              - account_status
              - language_id
              - timezone_id
              - currency_id
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                description: Must be unique across the platform.
              account_status:
                type: string
                enum:
                  - active
                  - inactive
                  - suspended
              title:
                type: string
              work_phone:
                type: string
              cell_phone:
                type: string
              instant_messaging_id:
                type: integer
                description: >
                  The ID of an instant messaging platform. Values are 0 for None,
                  1 for Skype, 2 for Yahoo Messenger, 3 for Telegram, 4 for WhatsApp,
                  5 for Other.
              instant_messaging_identifier:
                type: string
                description: Required when an `instant_messaging_id` is selected.
              language_id:
                type: integer
                description: Language ID (1 = English).
              timezone_id:
                type: integer
                description: Timezone ID from the metadata API.
              currency_id:
                type: string
                description: ISO currency code for this user.
        integrations:
          type: object
          description: Third-party integration settings for this advertiser.
    AdvertiserUpdateInput:
      description: >
        Input schema for updating an existing advertiser. Uses the same fields as the
        create schema, except that users cannot be added through the update endpoint.
        To manage users, use the advertiser users endpoints instead.
      allOf:
        - $ref: "#/components/schemas/AdvertiserInput"
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey
